sensord: add/change enums and types for avoiding build-break 42/33242/1
authorKibak Yoon <kibak.yoon@samsung.com>
Wed, 7 Jan 2015 06:24:37 +0000 (15:24 +0900)
committerKibak Yoon <kibak.yoon@samsung.com>
Wed, 7 Jan 2015 06:24:37 +0000 (15:24 +0900)
this patch would be reverted. However enumerations and types are added
for avoiding build-break until sensor capi is replaced by Tizen 2.3 API.
all packages which use tizen 2.2.1 api doesn't have a problem about
building, but some APIs don't work from now.

Change-Id: I8511158d977304b738fb33c9842a749e0f3519d1
Signed-off-by: Kibak Yoon <kibak.yoon@samsung.com>
46 files changed:
src/accel/accel_sensor.cpp
src/accel/accel_sensor.h
src/accel/accel_sensor_hal.cpp
src/accel/accel_sensor_hal.h
src/geo/geo_sensor.cpp
src/geo/geo_sensor.h
src/geo/geo_sensor_hal.cpp
src/geo/geo_sensor_hal.h
src/gravity/gravity_sensor.cpp
src/gravity/gravity_sensor.h
src/gyro/gyro_sensor.cpp
src/gyro/gyro_sensor.h
src/gyro/gyro_sensor_hal.cpp
src/gyro/gyro_sensor_hal.h
src/libsensord/CMakeLists.txt
src/libsensord/client.cpp
src/libsensord/sensor_deprecated.h [new file with mode: 0644]
src/libsensord/sensor_internal_deprecated.h
src/libsensord/sensor_motion.h
src/light/light_sensor.cpp
src/light/light_sensor.h
src/light/light_sensor_hal.cpp
src/light/light_sensor_hal.h
src/linear_accel/linear_accel_sensor.cpp
src/linear_accel/linear_accel_sensor.h
src/orientation/orientation_sensor.cpp
src/orientation/orientation_sensor.h
src/pressure/pressure_sensor.cpp
src/pressure/pressure_sensor.h
src/pressure/pressure_sensor_hal.cpp
src/pressure/pressure_sensor_hal.h
src/proxi/proxi_sensor.cpp
src/proxi/proxi_sensor.h
src/proxi/proxi_sensor_hal.cpp
src/proxi/proxi_sensor_hal.h
src/rotation_vector/rv/rv_sensor.cpp
src/rotation_vector/rv/rv_sensor.h
src/shared/sensor_base.cpp
src/shared/sensor_base.h
src/shared/sensor_common.h
src/shared/sensor_hal.h
src/shared/sf_common.h
src/temperature/temperature_sensor.cpp
src/temperature/temperature_sensor.h
src/temperature/temperature_sensor_hal.cpp
src/temperature/temperature_sensor_hal.h

index 7323b354ad6e0852346d8d1e07d95866fc37a73f..55ddf2b5897c7ba803d8e1228bcdbc2b40cdbc46 100755 (executable)
@@ -65,7 +65,7 @@ bool accel_sensor::init()
                return false;
        }
 
-       sensor_properties_t properties;
+       sensor_properties_s properties;
 
        if (m_sensor_hal->get_properties(properties) == false) {
                ERR("sensor->get_properties() is failed!\n");
@@ -133,7 +133,7 @@ bool accel_sensor::on_stop(void)
        return stop_poll();
 }
 
-bool accel_sensor::get_properties(sensor_properties_t &properties)
+bool accel_sensor::get_properties(sensor_properties_s &properties)
 {
        return m_sensor_hal->get_properties(properties);
 }
index 5d946ba76339684d0948c42d329a07053ba92a4e..fec8d6956d2abcc2e69e23a89ff7bfab9ecdb9e3 100755 (executable)
@@ -35,7 +35,7 @@ public:
 
        static bool working(void *inst);
        virtual bool set_interval(unsigned long interval);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
        virtual int get_sensor_data(unsigned int type, sensor_data_t &data);
 private:
        sensor_hal *m_sensor_hal;
index 53bb2d7d952910102c3c2c9a94d4c8447de96eae..6a78105172c4079a8e48ca41e274e13f6da3172b 100755 (executable)
@@ -436,7 +436,7 @@ int accel_sensor_hal::get_sensor_data(sensor_data_t &data)
        return 0;
 }
 
-bool accel_sensor_hal::get_properties(sensor_properties_t &properties)
+bool accel_sensor_hal::get_properties(sensor_properties_s &properties)
 {
        properties.name = m_chip_name;
        properties.vendor = m_vendor;
index b2e86e17db7b65a84bed1efb48eb623573f4a2ad..821bb1e39bd518269e87c0170b394bec32592400 100755 (executable)
@@ -41,7 +41,7 @@ public:
        bool set_interval(unsigned long val);
        bool is_data_ready(bool wait);
        virtual int get_sensor_data(sensor_data_t &data);
-       bool get_properties(sensor_properties_t &properties);
+       bool get_properties(sensor_properties_s &properties);
 //     bool check_hw_node(void);
 
 private:
index 029df717abbbd18f96e52a3e5081729a22c2d1e4..7f967c76bb7cf0648ae0cb5b3ad94823d25f5185 100755 (executable)
@@ -51,7 +51,7 @@ bool geo_sensor::init()
                return false;
        }
 
-       sensor_properties_t properties;
+       sensor_properties_s properties;
 
        if (m_sensor_hal->get_properties(properties) == false) {
                ERR("sensor->get_properties() is failed!\n");
@@ -118,7 +118,7 @@ bool geo_sensor::on_stop(void)
        return stop_poll();
 }
 
-bool geo_sensor::get_properties(sensor_properties_t &properties)
+bool geo_sensor::get_properties(sensor_properties_s &properties)
 {
        return m_sensor_hal->get_properties(properties);
 }
index c211e5c54278afd2beb13b1a686e868e8213212e..d864ec1bafd87d559a7b0fb4e4440b25c274f169 100755 (executable)
@@ -36,7 +36,7 @@ public:
        static bool working(void *inst);
 
        virtual bool set_interval(unsigned long interval);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
        int get_sensor_data(unsigned int type, sensor_data_t &data);
 private:
        sensor_hal *m_sensor_hal;
index 21a2276dd56d2a004c4ae23d9ae4b7be70e66240..fdd99f940e86d55375165dc09d5ac19f74843f2b 100755 (executable)
@@ -195,7 +195,7 @@ int geo_sensor_hal::get_sensor_data(sensor_data_t &data)
        return 0;
 }
 
-bool geo_sensor_hal::get_properties(sensor_properties_t &properties)
+bool geo_sensor_hal::get_properties(sensor_properties_s &properties)
 {
        properties.name = m_chip_name;
        properties.vendor = m_vendor;
index 25183d2262d16f8bee22a1532d0fefcb9d2a3525..291c7251222645bab783247f7a130d7402493025 100755 (executable)
@@ -44,7 +44,7 @@ public:
        bool set_interval(unsigned long val);
        bool is_data_ready(bool wait);
        virtual int get_sensor_data(sensor_data_t &data);
-       bool get_properties(sensor_properties_t &properties);
+       bool get_properties(sensor_properties_s &properties);
 private:
        string m_model_id;
        string m_vendor;
index 546731845e5a69fd32cd14a036a577b9438e6558..21b8e9648b193be686d3ab3cf0eb71546af028fb 100755 (executable)
@@ -255,7 +255,7 @@ int gravity_sensor::get_sensor_data(const unsigned int event_type, sensor_data_t
        return 0;
 }
 
-bool gravity_sensor::get_properties(sensor_properties_t &properties)
+bool gravity_sensor::get_properties(sensor_properties_s &properties)
 {
        properties.min_range = -GRAVITY;
        properties.max_range = GRAVITY;
index 03fd4f3ac567fcd705696f41154ed08fa392017e..ec2c5e1352e810184b11b190577b590385363d03 100755 (executable)
@@ -40,7 +40,7 @@ public:
        bool delete_interval(int client_id);
 
        int get_sensor_data(const unsigned int event_type, sensor_data_t &data);
-       bool get_properties(sensor_properties_t &properties);
+       bool get_properties(sensor_properties_s &properties);
 private:
        sensor_base *m_orientation_sensor;
        cmutex m_value_mutex;
index d057959886f6d4e657f1e47bd249012ff155df6f..30f562bf788c1682989bcae2fbde236e1b7a68b9 100755 (executable)
@@ -54,7 +54,7 @@ bool gyro_sensor::init()
                return false;
        }
 
-       sensor_properties_t properties;
+       sensor_properties_s properties;
 
        if (m_sensor_hal->get_properties(properties) == false) {
                ERR("sensor->get_properties() is failed!\n");
@@ -120,7 +120,7 @@ bool gyro_sensor::on_stop(void)
        return stop_poll();
 }
 
-bool gyro_sensor::get_properties(sensor_properties_t &properties)
+bool gyro_sensor::get_properties(sensor_properties_s &properties)
 {
        return m_sensor_hal->get_properties(properties);
 }
index 81d7557975c7c674d9c4788f0a7504b1d6a97103..a56ca2ffceb2452bc142e6abe317a537032cd9f3 100755 (executable)
@@ -36,7 +36,7 @@ public:
        static bool working(void *inst);
 
        virtual bool set_interval(unsigned long interval);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
        int get_sensor_data(unsigned int type, sensor_data_t &data);
 private:
        sensor_hal *m_sensor_hal;
index c9bf1352c6e0e6eeccd4074cdbd18f730ce82733..f4f690eaa8158544eb6d8057286de2b664fde955 100755 (executable)
@@ -281,7 +281,7 @@ int gyro_sensor_hal::get_sensor_data(sensor_data_t &data)
        return 0;
 }
 
-bool gyro_sensor_hal::get_properties(sensor_properties_t &properties)
+bool gyro_sensor_hal::get_properties(sensor_properties_s &properties)
 {
        properties.name = m_chip_name;
        properties.vendor = m_vendor;
index f2e63a690d89f95c11bbb3d809f20ac8a66df415..dcb8bfe6ea4b9096a56d6b62dc804fe08648806b 100755 (executable)
@@ -41,7 +41,7 @@ public:
        bool set_interval(unsigned long ms_interval);
        bool is_data_ready(bool wait);
        virtual int get_sensor_data(sensor_data_t &data);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
 
 private:
        int m_x;
index 5a59254549543c9b136570e3e66b87df4e13bb73..4b5161170672d868295a43bf5a07ecc6f72a37ac 100755 (executable)
@@ -57,4 +57,5 @@ install(FILES sensor_orientation.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/senso
 install(FILES sensor_rv.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sensor/)
 install(FILES sensor_temperature.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sensor/)
 install(FILES sensor_motion.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sensor/)
+install(FILES sensor_deprecated.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sensor/)
 install(FILES ${PROJECT_NAME}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
index 31329212f77ae5294126d8777edafa3433d4e524..dcac6462fad03cceee4a3dbcb81ede64f7965422 100755 (executable)
@@ -388,6 +388,21 @@ API int sf_check_rotation(unsigned long *rotation)
        return 0;
 }
 
+int sf_is_sensor_event_available(sensor_type_t sensor_type, unsigned int event_type)
+{
+       return 0;
+}
+
+int sf_get_data_properties(unsigned int data_id, sensor_data_properties_t *return_data_properties)
+{
+       return 0;
+}
+
+int sf_get_properties(sensor_type_t sensor_type, sensor_properties_t *return_properties)
+{
+       return 0;
+}
+
 static bool get_sensor_list(void)
 {
        static cmutex l;
diff --git a/src/libsensord/sensor_deprecated.h b/src/libsensord/sensor_deprecated.h
new file mode 100644 (file)
index 0000000..094907a
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * libsensord
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __SENSOR_DEPRECATED_H__
+#define __SENSOR_DEPRECATED_H__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define ACCELEROMETER_EVENT_ROTATION_CHECK ((ACCELEROMETER_SENSOR << 16) | 0x0100)
+
+#define ACCELEROMETER_ORIENTATION_DATA_SET (ACCELEROMETER_SENSOR << 16) | 0x0002
+#define ACCELEROMETER_LINEAR_ACCELERATION_DATA_SET (ACCELEROMETER_SENSOR << 16) | 0x0004
+#define ACCELEROMETER_GRAVITY_DATA_SET (ACCELEROMETER_SENSOR << 16) | 0x0008
+
+#define ACCELEROMETER_EVENT_GRAVITY_DATA_REPORT_ON_TIME (ACCELEROMETER_SENSOR << 16) | 0x0080
+#define ACCELEROMETER_EVENT_LINEAR_ACCELERATION_DATA_REPORT_ON_TIME (ACCELEROMETER_SENSOR << 16) | 0x0040
+#define ACCELEROMETER_EVENT_ORIENTATION_DATA_REPORT_ON_TIME (ACCELEROMETER_SENSOR << 16) | 0x0020
+#define GEOMAGNETIC_EVENT_ATTITUDE_DATA_REPORT_ON_TIME (GEOMAGNETIC_SENSOR << 16) | 0x0004
+#define ACCELEROMETER_EVENT_CALIBRATION_NEEDED 0x01
+#define ACCELEROMETER_EVENT_SET_WAKEUP 0x02
+
+enum accelerometer_rotate_state {
+       ROTATION_UNKNOWN = 0,
+       ROTATION_LANDSCAPE_LEFT = 1,
+       ROTATION_PORTRAIT_TOP = 2,
+       ROTATION_PORTRAIT_BTM = 3,
+       ROTATION_LANDSCAPE_RIGHT = 4,
+       ROTATION_EVENT_0 = 2,
+       ROTATION_EVENT_90 = 1,
+       ROTATION_EVENT_180 = 3,
+       ROTATION_EVENT_270 = 4,
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //__SENSOR_DEPRECATED_H__
+
index 9f3910dcbd061259efb567df6cd0d65a32a6167d..69fa4ecb5d850a103624cb267360a9cca09a3cf9 100755 (executable)
@@ -50,6 +50,9 @@ extern "C"
 #include <sensor_temperature.h>
 #include <sensor_rv.h>
 #include <sensor_motion.h>
+#include <sensor_deprecated.h>
+
+#define MAX_KEY_LEN 30
 
 typedef struct {
        condition_op_t cond_op;
@@ -70,19 +73,27 @@ typedef struct {
        int z;
 } sensor_panning_data_t;
 
-#define ACCELEROMETER_EVENT_ROTATION_CHECK ((ACCELEROMETER_SENSOR << 16) | 0x0001)
-
-enum accelerometer_rotate_state {
-       ROTATION_UNKNOWN = 0,
-       ROTATION_LANDSCAPE_LEFT = 1,
-       ROTATION_PORTRAIT_TOP = 2,
-       ROTATION_PORTRAIT_BTM = 3,
-       ROTATION_LANDSCAPE_RIGHT = 4,
-       ROTATION_EVENT_0 = 2,
-       ROTATION_EVENT_90 = 1,
-       ROTATION_EVENT_180 = 3,
-       ROTATION_EVENT_270 = 4,
-};
+typedef struct {
+       int sensor_unit_idx;
+       float sensor_min_range;
+       float sensor_max_range;
+       float sensor_resolution;
+       char sensor_name[MAX_KEY_LEN];
+       char sensor_vendor[MAX_KEY_LEN];
+} sensor_properties_t;
+
+typedef struct {
+       int sensor_unit_idx;
+       float sensor_min_range;
+       float sensor_max_range;
+       float sensor_resolution;
+} sensor_data_properties_t;
+
+int sf_is_sensor_event_available(sensor_type_t sensor_type , unsigned int event_type);
+
+int sf_get_data_properties(unsigned int data_id, sensor_data_properties_t *return_data_properties);
+
+int sf_get_properties(sensor_type_t sensor_type, sensor_properties_t *return_properties);
 
 int sf_check_rotation(unsigned long *rotation);
 
index 205def64b317fe737b25c4aa37e9d470dec5b894..1fe2db5e60db9dab0711602caf11adc3c658a97c 100755 (executable)
@@ -28,8 +28,6 @@ extern "C"
 {
 #endif
 
-#define MOTION_SENSOR 0xFF
-
 enum motion_event_type {
        MOTION_ENGINE_EVENT_SNAP                                = (MOTION_SENSOR << 16) | 0x0001,
        MOTION_ENGINE_EVENT_SHAKE                               = (MOTION_SENSOR << 16) | 0x0002,
index af222e14a8f6c5dbc31fbbdaffbb5807ae01f5c4..bf287c66e9db22cbce9bc8245eeb819d159ba2eb 100755 (executable)
@@ -151,7 +151,7 @@ bool light_sensor::on_stop(void)
        return stop_poll();
 }
 
-bool light_sensor::get_properties(const unsigned int type, sensor_properties_t &properties)
+bool light_sensor::get_properties(const unsigned int type, sensor_properties_s &properties)
 {
        m_sensor_hal->get_properties(properties);
 
index 455df3d06a290fe28fcd07f7e6f557e75ed5bfc7..18bbe48025e2698c8bb976a33be777103d46c61b 100755 (executable)
@@ -39,7 +39,7 @@ public:
        virtual bool on_stop(void);
 
        virtual bool set_interval(unsigned long interval);
-       virtual bool get_properties(const unsigned int type, sensor_properties_t &properties);
+       virtual bool get_properties(const unsigned int type, sensor_properties_s &properties);
        int get_sensor_data(const unsigned int type, sensor_data_t &data);
 
 private:
index 4cc630cec9d1471f3f016460837edd81e6c6aa04..521a2dcf7215e3719c584ede263c5559f0b1fe94 100755 (executable)
@@ -181,7 +181,7 @@ int light_sensor_hal::get_sensor_data(sensor_data_t &data)
 }
 
 
-bool light_sensor_hal::get_properties(sensor_properties_t &properties)
+bool light_sensor_hal::get_properties(sensor_properties_s &properties)
 {
        properties.name = m_chip_name;
        properties.vendor = m_vendor;
index ec351044fbc5c7b1a0b611330a596071591db5ba..f2043ec3c3f5f54251f0318ef6b9618818467ada 100755 (executable)
@@ -37,7 +37,7 @@ public:
        bool set_interval(unsigned long val);
        bool is_data_ready(bool wait);
        virtual int get_sensor_data(sensor_data_t &data);
-       bool get_properties(sensor_properties_t &properties);
+       bool get_properties(sensor_properties_s &properties);
 private:
        string m_model_id;
        string m_vendor;
index 6d7c1df823cb0c97eeede01e00461fa0331c76e0..94a5f8fc1cc0059b73ef8448df835026f585bb1a 100755 (executable)
@@ -271,7 +271,7 @@ int linear_accel_sensor::get_sensor_data(const unsigned int event_type, sensor_d
        return 0;
 }
 
-bool linear_accel_sensor::get_properties(sensor_properties_t &properties)
+bool linear_accel_sensor::get_properties(sensor_properties_s &properties)
 {
        m_accel_sensor->get_properties(properties);
        properties.name = "Linear Acceleration Sensor";
index 273fa84a5f92d7a23c3dc16d446d276259f13586..b17792ffe7d69f30778d4a653d200a4a5eed7613 100755 (executable)
@@ -38,7 +38,7 @@ public:
        bool delete_interval(int client_id);
 
        int get_sensor_data(const unsigned int event_type, sensor_data_t &data);
-       bool get_properties(sensor_properties_t &properties);
+       bool get_properties(sensor_properties_s &properties);
 private:
        sensor_base *m_accel_sensor;
        sensor_base *m_gravity_sensor;
index 9419c9674c35c37363200ce548e549870de6b63f..56658bad3389b00067cf325ae1f95f4159d419ce 100755 (executable)
@@ -432,7 +432,7 @@ int orientation_sensor::get_sensor_data(const unsigned int event_type, sensor_da
        return 0;
 }
 
-bool orientation_sensor::get_properties(sensor_properties_t &properties)
+bool orientation_sensor::get_properties(sensor_properties_s &properties)
 {
        if(m_raw_data_unit == "DEGREES") {
                properties.min_range = -180;
index ed618916eb31f2d1bc2f096247d4b0c05f8c30da..4ae764f4155b66425148c55103ac5f6c499cf352 100755 (executable)
@@ -35,7 +35,7 @@ public:
 
        bool add_interval(int client_id, unsigned int interval);
        bool delete_interval(int client_id);
-       bool get_properties(sensor_properties_t &properties);
+       bool get_properties(sensor_properties_s &properties);
        sensor_type_t get_type(void);
 
        int get_sensor_data(const unsigned int data_id, sensor_data_t &data);
index d29311cd018df1f9545de73bedcddd53df3c5b21..d1f23a2be9221983fb18e9061b59a0a22fc28310 100755 (executable)
@@ -62,7 +62,7 @@ bool pressure_sensor::init()
                return false;
        }
 
-       sensor_properties_t properties;
+       sensor_properties_s properties;
 
        if (!m_sensor_hal->get_properties(properties)) {
                ERR("sensor->get_properties() is failed!\n");
@@ -152,7 +152,7 @@ bool pressure_sensor::on_stop(void)
        return stop_poll();
 }
 
-bool pressure_sensor::get_properties(sensor_properties_t &properties)
+bool pressure_sensor::get_properties(sensor_properties_s &properties)
 {
        return m_sensor_hal->get_properties(properties);
 }
index 1bd8df2f04651b50047ce7c462a48b73c755ee8b..6bd0f40f64c47b45fc77b7d1517e0d4f1b09a0a0 100755 (executable)
@@ -37,7 +37,7 @@ public:
        static bool working(void *inst);
 
        bool set_interval(unsigned long interval);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
        int get_sensor_data(unsigned int type, sensor_data_t &data);
 
 private:
index c899d3eb89781ac642567d86a28b15a134539fa9..6485dab636fc8261f340eb120ce6db4617e76e64 100755 (executable)
@@ -303,7 +303,7 @@ int pressure_sensor_hal::get_sensor_data(sensor_data_t &data)
 }
 
 
-bool pressure_sensor_hal::get_properties(sensor_properties_t &properties)
+bool pressure_sensor_hal::get_properties(sensor_properties_s &properties)
 {
        properties.name = m_chip_name;
        properties.vendor = m_vendor;
index 42e531010b96dee65864fca21e59de1a39520ca0..28c5d87dfb90d97c70e82bf674e08f75a536c578 100755 (executable)
@@ -37,7 +37,7 @@ public:
        bool set_interval(unsigned long val);
        bool is_data_ready(bool wait);
        virtual int get_sensor_data(sensor_data_t &data);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
 
 private:
        string m_model_id;
index 37dfce6c3a3e2e143c52c742649ae6b818e23aec..4db701aacc64e978ca367d1e77ab5814aae05a31 100755 (executable)
@@ -122,7 +122,7 @@ bool proxi_sensor::on_stop(void)
        return stop_poll();
 }
 
-bool proxi_sensor::get_properties(sensor_properties_t &properties)
+bool proxi_sensor::get_properties(sensor_properties_s &properties)
 {
        m_sensor_hal->get_properties(properties);
 
index f05872475136b3e82f60a5d1f8c1b9484111150d..9a45e720667579c1be68f91732c0f0396009f4f4 100755 (executable)
@@ -34,7 +34,7 @@ public:
 
        static bool working(void *inst);
 
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
        int get_sensor_data(unsigned int type, sensor_data_t &data);
 private:
        sensor_hal *m_sensor_hal;
index 3154c1808ce4de1c6d5bfde98948fe02b896e15b..73bdd7500df53e2b1d725b2b67bb70e775480282 100755 (executable)
@@ -238,7 +238,7 @@ int proxi_sensor_hal::get_sensor_data(sensor_data_t &data)
        return 0;
 }
 
-bool proxi_sensor_hal::get_properties(sensor_properties_t &properties)
+bool proxi_sensor_hal::get_properties(sensor_properties_s &properties)
 {
        properties.name = m_chip_name;
        properties.vendor = m_vendor;
index 6113397b60ae0d6170b81b44e03d5a043bb7643a..17d818269677080e0c4ad0d4f251a0e86a0b3cf8 100755 (executable)
@@ -42,7 +42,7 @@ public:
        bool disable(void);
        bool is_data_ready(bool wait);
        virtual int get_sensor_data(sensor_data_t &data);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
 private:
        string m_model_id;
        string m_vendor;
index e37ff33ef90e1d147dcb0d66409887977852b6e6..e5d0a0e37892e4fbf89fbf43403215e3c2f6651d 100755 (executable)
@@ -383,7 +383,7 @@ int rv_sensor::get_sensor_data(unsigned int data_id, sensor_data_t &data)
        return 0;
 }
 
-bool rv_sensor::get_properties(sensor_properties_t &properties)
+bool rv_sensor::get_properties(sensor_properties_s &properties)
 {
        properties.vendor = m_vendor;
        properties.name = SENSOR_NAME;
index 3d84a805839ce2ec11a1bd2f39c9ccde5d8b8afd..04b42b626b41280ceb5cab89b6e3a0aaf799b6f8 100755 (executable)
@@ -35,7 +35,7 @@ public:
 
        bool add_interval(int client_id, unsigned int interval);
        bool delete_interval(int client_id);
-       bool get_properties(sensor_properties_t &properties);
+       bool get_properties(sensor_properties_s &properties);
        sensor_type_t get_type(void);
 
        int get_sensor_data(const unsigned int data_id, sensor_data_t &data);
index 3b71b361f31c1c73f5b8cf45126e36e2a2d2bbd2..109504c1591619e4913780bff7fe94d429f1eeee 100755 (executable)
@@ -252,7 +252,7 @@ unsigned int sensor_base::get_interval(int client_id, bool is_processor)
 
 void sensor_base::get_sensor_info(sensor_info &info)
 {
-       sensor_properties_t properties;
+       sensor_properties_s properties;
        get_properties(properties);
 
        info.set_type(get_type());
@@ -271,7 +271,7 @@ void sensor_base::get_sensor_info(sensor_info &info)
        return;
 }
 
-bool sensor_base::get_properties(sensor_properties_t &properties)
+bool sensor_base::get_properties(sensor_properties_s &properties)
 {
        return true;
 }
index 1cc6636ad8f6aabbf8d27d34b58b3fb8887812f0..16d3dba8e789f109f3b2fd6d4e2da93e62bf7f3c 100755 (executable)
@@ -76,7 +76,7 @@ public:
 
 
        void get_sensor_info(sensor_info &info);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
        bool is_supported(unsigned int event_type);
 
        virtual long set_command(unsigned int cmd, long value);
index cfecead19f208d1a751cfd6c9c888052fee013a4..7fbfec77d083293c1c45c1f7acb73e4b522eeb0b 100755 (executable)
@@ -56,7 +56,8 @@ typedef enum {
        LINEAR_ACCEL_SENSOR,
        ORIENTATION_SENSOR,
        TEMPERATURE_SENSOR,
-       ROTATION_VECTOR_SENSOR
+       ROTATION_VECTOR_SENSOR,
+       MOTION_SENSOR
 } sensor_type_t;
 
 typedef unsigned int sensor_id_t;
@@ -84,7 +85,10 @@ typedef struct sensor_data_t {
                int data_accuracy; //deprecated
        };
 
-       unsigned long long timestamp;
+       union {
+               unsigned long long timestamp;
+               unsigned long long time_stamp; //deprecated
+       };
 
 /*
  *     Use "value_count" instead of "values_num"
index 261608e22d710e6fdd1f400462bb2fb8181283dc..41d5d6dc01f7c98362f4505070281918bb91e0aa 100755 (executable)
@@ -79,7 +79,7 @@ public:
        virtual bool disable(void) = 0;
        virtual bool set_interval(unsigned long val);
        virtual bool is_data_ready(bool wait) = 0;
-       virtual bool get_properties(sensor_properties_t &properties) = 0;
+       virtual bool get_properties(sensor_properties_s &properties) = 0;
        virtual int get_sensor_data(sensor_data_t &data);
        virtual int get_sensor_data(sensorhub_data_t &data);
        virtual long set_command(unsigned int cmd, long val);
index a47ef4f450b3d6d2bdfc470df2c347dc7c9b40fd..3b6b79e02cdd6d955ed27c1a197f6b84c7ba11b0 100755 (executable)
@@ -162,7 +162,7 @@ typedef struct {
        int min_interval;
        int fifo_count;
        int max_batch_count;
-} sensor_properties_t;
+} sensor_properties_s;
 
 
 /*
index 944d3c5c1ed7a7b2776f821475c8557cb1e4fdfb..b81c645e50c224802c9dcdd9cfa5f7aa05f98bc2 100755 (executable)
@@ -51,7 +51,7 @@ bool temperature_sensor::init()
                return false;
        }
 
-       sensor_properties_t properties;
+       sensor_properties_s properties;
 
        if (!m_sensor_hal->get_properties(properties))
        {
@@ -120,7 +120,7 @@ bool temperature_sensor::on_stop(void)
        return stop_poll();
 }
 
-bool temperature_sensor::get_properties(sensor_properties_t &properties)
+bool temperature_sensor::get_properties(sensor_properties_s &properties)
 {
        return m_sensor_hal->get_properties(properties);
 }
index bcf93469145e6838e9e9cd4d1a0b9c96852f60e4..9bb881aab1609dffadc0e982471f170194e0f8ea 100755 (executable)
@@ -36,7 +36,7 @@ public:
        static bool working(void *inst);
 
        bool set_interval(unsigned long interval);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
        int get_sensor_data(unsigned int type, sensor_data_t &data);
 
 private:
index cf562bba62825938ec921c0c6a3ac43b805867c8..05889529cd7ea0c4c70301cebc47f4482ade6087 100755 (executable)
@@ -196,7 +196,7 @@ int temperature_sensor_hal::get_sensor_data(sensor_data_t &data)
 }
 
 
-bool temperature_sensor_hal::get_properties(sensor_properties_t &properties)
+bool temperature_sensor_hal::get_properties(sensor_properties_s &properties)
 {
        properties.name = m_chip_name;
        properties.vendor = m_vendor;
index f492ee452f13803e4133c06c79e85fa0506014d8..aba0fb7c22906d06f0fd418ade0f8917adbc6e5e 100755 (executable)
@@ -44,7 +44,7 @@ public:
        bool set_interval(unsigned long val);
        bool is_data_ready(bool wait);
        virtual int get_sensor_data(sensor_data_t &data);
-       bool get_properties(sensor_properties_t &properties);
+       bool get_properties(sensor_properties_s &properties);
 private:
        float m_temperature;
        int m_node_handle;