platform/core/system/sensord.git
8 years agoMerge branch 'devel/tizen_3.0' into tizen 45/64745/1 accepted/tizen/common/20160406.143452 accepted/tizen/ivi/20160406.012334 accepted/tizen/mobile/20160406.012247 accepted/tizen/tv/20160406.012300 accepted/tizen/wearable/20160406.012322 submit/tizen/20160405.021030
kibak.yoon [Tue, 5 Apr 2016 07:45:20 +0000 (16:45 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0:
  sensord: change default return value to true for additional commands/HAL APIs

Change-Id: I914060a42f855dcaec179d520037cdd23ce9a9c3
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: change default return value to true for additional commands/HAL 39/64739/1
kibak.yoon [Tue, 5 Apr 2016 07:36:30 +0000 (16:36 +0900)]
sensord: change default return value to true for additional commands/HAL
APIs

- set_interval(uint32_t id, unsigned long val)
- set_batch_latency(uint32_t id, unsigned
- set_attribute_int(uint32_t id, int32_t attribute, int32_t value)
- set_attribute_str(uint32_t id, int32_t attribute, char *value, int value_len)
- flush(uint32_r id)

Change-Id: I63d9110f950948a4ff3a4236b2afef285202a92d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agoMerge branch 'devel/tizen_3.0' into tizen 99/64699/1
kibak.yoon [Tue, 5 Apr 2016 01:37:38 +0000 (10:37 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0: (31 commits)
  Revert "sensorctl test"
  sensorctl test
  sensord: replace 0x% with %#
  sensord: change static function to member function about get_timestamp()
  sensor-hal: sync with the latest HAL interface
  sensord: set calibration at booting time if cal_node is existed
  sensord: fix the memory leak when get_data is failed
  sensord: remove unused variable
  sensor_base: add sensor event data caching for sync-read support
  sensord: use memcpy instead of copying values
  sensord: in similar with the interval, sensor attributes are separately maintained for each client.
  sensord: skip the get_data process when there are some problems
  sensord: hal: splite sensor_hal.h into sensor_hal interface and hal types
  sensord: add the comments for logic
  sensord: check whether the data is valid or not
  sensord: change sensor name to be the same as an sensor type name
  sensord: remove unused code in auto_rotation sensor
  poller: continue to handle remaining events even if on_event() returns false
  sensor_base: add data length parameter to on_event()
  sensord: close handles in sensor_loader destructor
  ...

Change-Id: I6c1d88a091826e7895f98cad68507f16d968f10b
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agoRevert "sensorctl test" 97/64697/1
Kibak Yoon [Tue, 5 Apr 2016 01:25:42 +0000 (18:25 -0700)]
Revert "sensorctl test"

This reverts commit 2f18f5a17af85c0b0c70d77c7a800f9ee14d6cef.

Change-Id: I8806d63b95156b4d9402eae26502ba24b1921657

8 years agosensorctl test 66/64666/2
kibak.yoon [Mon, 4 Apr 2016 13:30:33 +0000 (22:30 +0900)]
sensorctl test

Change-Id: Ibec35d870f89260eaeeaa39a98dfcc488d536373
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: replace 0x% with %# 30/64630/1
kibak.yoon [Mon, 4 Apr 2016 08:38:58 +0000 (17:38 +0900)]
sensord: replace 0x% with %#

- %# adds "0x" prefix according to data type

Change-Id: I7d20614603c18d14e4710b04c59aaa7f10a8e7f3
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: change static function to member function about get_timestamp() 79/64579/1
kibak.yoon [Mon, 4 Apr 2016 01:33:57 +0000 (10:33 +0900)]
sensord: change static function to member function about get_timestamp()

* there is no reason for get_timestamp() function to be static.

Change-Id: Ie8531a2bcde5523f6219ffb16aa11dd25b3034fc
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensor-hal: sync with the latest HAL interface 32/64532/1
kibak.yoon [Fri, 1 Apr 2016 13:49:32 +0000 (22:49 +0900)]
sensor-hal: sync with the latest HAL interface

Change-Id: I7b718bbfd14ff39f39c6adb9b16fe7935ae339d0
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: set calibration at booting time if cal_node is existed 31/64531/1
kibak.yoon [Fri, 1 Apr 2016 13:49:00 +0000 (22:49 +0900)]
sensord: set calibration at booting time if cal_node is existed

* calibration is needed on tw1 device

Change-Id: Ie84d5c391269352b701d882b9c163b90f76c1307
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: fix the memory leak when get_data is failed 29/64529/1
kibak.yoon [Mon, 28 Mar 2016 15:39:13 +0000 (00:39 +0900)]
sensord: fix the memory leak when get_data is failed

 - problem: if sensor->get_data() is failed, event memory is not freed.
            so there is memory-leak problem.
 - solution: the allocation code of the event meory is moved when it is needed.

Change-Id: If42ab454c269ceab2ed64a13a9915cab23a2822e
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: remove unused variable 19/64519/1
kibak.yoon [Fri, 1 Apr 2016 12:15:06 +0000 (21:15 +0900)]
sensord: remove unused variable

- remove compliler warning.

Change-Id: I47f2788ca8d09902d1f2d6342c77fd258b91412e
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensor_base: add sensor event data caching for sync-read support 18/64518/1
Mu-Woong Lee [Thu, 31 Mar 2016 10:32:23 +0000 (19:32 +0900)]
sensor_base: add sensor event data caching for sync-read support

With this patch, sync-read requests from clients do not need to call get_data() functions of HALs anymore.

Change-Id: I00560691f23fe15a0d785f7597b78b75b939a930
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
8 years agosensord: use memcpy instead of copying values 17/64517/1
kibak.yoon [Thu, 31 Mar 2016 10:19:13 +0000 (19:19 +0900)]
sensord: use memcpy instead of copying values

* if value_count is over 16(max value count), it makes a problem when
  values is copied in loop.

Change-Id: I8f07fe76909fe995027a604ac18bb9cdb6fbf827
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: in similar with the interval, sensor attributes are separately maintained... 16/64516/1
Mu-Woong Lee [Mon, 21 Mar 2016 09:48:08 +0000 (18:48 +0900)]
sensord: in similar with the interval, sensor attributes are separately maintained for each client.

Change-Id: If3ced3df21fd9cc84ae55d9d113487efa3d95895
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
8 years agosensord: skip the get_data process when there are some problems 15/64515/1
kibak.yoon [Thu, 31 Mar 2016 01:43:55 +0000 (10:43 +0900)]
sensord: skip the get_data process when there are some problems

* after initializing data pointer, skip the get_data process

Change-Id: Ie4fc53f7d3f529821542875ff97f6839dce0dfee
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: hal: splite sensor_hal.h into sensor_hal interface and hal 14/64514/1
kibak.yoon [Wed, 23 Mar 2016 03:20:52 +0000 (12:20 +0900)]
sensord: hal: splite sensor_hal.h into sensor_hal interface and hal
types

Change-Id: If9ec7348721581839faecf022e29c88134debe68
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: add the comments for logic 13/64513/1
kibak.yoon [Tue, 22 Mar 2016 14:09:30 +0000 (23:09 +0900)]
sensord: add the comments for logic

Change-Id: I68bf587381b3a9371512d3d2c74cb5091c496b94
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: check whether the data is valid or not 12/64512/1
kibak.yoon [Tue, 22 Mar 2016 14:08:12 +0000 (23:08 +0900)]
sensord: check whether the data is valid or not

Change-Id: Ia456be16c90f949b1d32bbdc53579b41d58a477d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: change sensor name to be the same as an sensor type name 11/64511/1
kibak.yoon [Wed, 16 Mar 2016 13:01:10 +0000 (22:01 +0900)]
sensord: change sensor name to be the same as an sensor type name

* "*_SENSOR" instead of "SENSOR_"
* this patch is applied to virtual sensors

Change-Id: I9c5af4a00f2e6dbff217ae6cc4bcaec4848d0a02
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: remove unused code in auto_rotation sensor 10/64510/1
kibak.yoon [Fri, 1 Apr 2016 11:44:59 +0000 (20:44 +0900)]
sensord: remove unused code in auto_rotation sensor

* loading values from virtual_sensor config is not used in auto rotation
  sensor, so remove them and related-macros.
* remove unused function

Change-Id: I78b48351a334ab0861268587568fb77c3c5cdd3a
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agopoller: continue to handle remaining events even if on_event() returns false 09/64509/1
Mu-Woong Lee [Fri, 18 Mar 2016 11:50:20 +0000 (20:50 +0900)]
poller: continue to handle remaining events even if on_event() returns false

Change-Id: I93759e5aa8cfb46daacff01fff7763489e9827ee
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
8 years agosensor_base: add data length parameter to on_event() 08/64508/1
Mu-Woong Lee [Mon, 21 Mar 2016 03:01:49 +0000 (12:01 +0900)]
sensor_base: add data length parameter to on_event()

Change-Id: I7b29eb919534e741816ceeb06fd5ddb72919707e
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
8 years agosensord: close handles in sensor_loader destructor 07/64507/1
kibak.yoon [Thu, 31 Mar 2016 01:41:24 +0000 (10:41 +0900)]
sensord: close handles in sensor_loader destructor

Change-Id: Ie24606b850a13708956808b36210a86983d62ae3
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: fix memory leak in virtual sensors 06/64506/1
kibak.yoon [Thu, 31 Mar 2016 01:35:07 +0000 (10:35 +0900)]
sensord: fix memory leak in virtual sensors

* event memory has to be not released when error happens

Change-Id: I53fe2d366069b773b6d9b05c052fa9ac56f85e0d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: remove useless buffer parameter 05/64505/1
kibak.yoon [Thu, 31 Mar 2016 01:26:41 +0000 (10:26 +0900)]
sensord: remove useless buffer parameter

* buffer in callback_info is not used anymore, remove it

Change-Id: I5a52e869e48972dcde7593a1cfd4333b380cb728
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: fix memory leak when legacy cb is used 04/64504/1
kibak.yoon [Thu, 31 Mar 2016 01:24:52 +0000 (10:24 +0900)]
sensord: fix memory leak when legacy cb is used

* when legacy cb is used, allocation of event is useless

Change-Id: I1698884940a6744f78963a28746e5b9e4313ec00
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: init epoll_event variable 03/64503/1
kibak.yoon [Wed, 30 Mar 2016 13:16:07 +0000 (22:16 +0900)]
sensord: init epoll_event variable

* if it does not set the value and some problem is happened at first,
  later, other developers can make a mistake. so for preventing it,
  initialize this variable's members.

Change-Id: I1c2fe47d816c50a524178d5a657b65cec929d4d2
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensor_base: modify get_timestamp() to protected functions 02/64502/1
Mu-Woong Lee [Mon, 28 Mar 2016 13:40:33 +0000 (22:40 +0900)]
sensor_base: modify get_timestamp() to protected functions

Change-Id: Ideaf97be8e3b9440b4cb4446b6fb0db843e38fc5
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
8 years agosensord: remove the unnecessary debug log 01/64501/1
kibak.yoon [Thu, 24 Mar 2016 12:04:49 +0000 (21:04 +0900)]
sensord: remove the unnecessary debug log

- a client can have serveral handles(it is same as listener) and each of
  handles can register each other sensor event. so there are so many cases
  that some event is not registered to handle.
- so it is unnecessary to show dlog.

Change-Id: Ib97a269e9368964baef84505895bd05ace2fde73
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: change the default return value to true 83/64483/2
kibak.yoon [Thu, 24 Mar 2016 04:10:21 +0000 (13:10 +0900)]
sensord: change the default return value to true

Change-Id: Ie943cef2f4375a0cdb2f5909c671218a620b98db
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: fix the bug about calling get_client_name 82/64482/2
kibak.yoon [Thu, 24 Mar 2016 01:01:59 +0000 (10:01 +0900)]
sensord: fix the bug about calling get_client_name

Change-Id: I671c013bad4215ab41a0ec47bb88ad6fa2621077
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: remove the changing g_main_context API 78/64478/3
kibak.yoon [Fri, 1 Apr 2016 10:14:42 +0000 (19:14 +0900)]
sensord: remove the changing g_main_context API

* this feature is not used anymore

Change-Id: I9073d2ee3908ca5d332b7659801e7f0f2b00d825
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: redefine _ERRNO macro to use easily 71/64471/2
kibak.yoon [Fri, 1 Apr 2016 09:26:50 +0000 (18:26 +0900)]
sensord: redefine _ERRNO macro to use easily

* in previous code, if additional message is needed for log, the another log
  has to be added. so redefine the macro for using it easily.

Change-Id: Ia05199f45acb1d23bf9142ab43e70898101b1a7a
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agoMerge "sensord: rename sensord_get_sensor_*_ex() APIs to proper names" into devel...
Mu-Woong Lee [Thu, 31 Mar 2016 03:00:04 +0000 (20:00 -0700)]
Merge "sensord: rename sensord_get_sensor_*_ex() APIs to proper names" into devel/tizen_3.0

8 years agoMerge branch 'devel/tizen_3.0' into tizen 95/64095/1 accepted/tizen/common/20160330.120525 accepted/tizen/ivi/20160330.063519 accepted/tizen/mobile/20160330.063212 accepted/tizen/tv/20160330.063303 accepted/tizen/wearable/20160330.063525 submit/tizen/20160330.045120
kibak.yoon [Wed, 30 Mar 2016 04:41:33 +0000 (13:41 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0:
  sensord: raise SIGKILL when sensord receive SIGTERM
  sensord: fix the bug that it releases static variable
  sensord: fix the bug about checking 0 although sensor_id can be 0

Change-Id: I9cbf883878470988b5159d5ec69f87e491a8c216
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: raise SIGKILL when sensord receive SIGTERM 93/64093/3
kibak.yoon [Wed, 30 Mar 2016 04:35:03 +0000 (13:35 +0900)]
sensord: raise SIGKILL when sensord receive SIGTERM

Change-Id: Idc6bc5b64441cc088c0d688d8b0f7980529522f9
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: fix the bug that it releases static variable 94/64094/3
kibak.yoon [Wed, 30 Mar 2016 04:37:17 +0000 (13:37 +0900)]
sensord: fix the bug that it releases static variable

Change-Id: Ic27ab5bcb886fe82c36f75e3970929485c0f3119
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: fix the bug about checking 0 although sensor_id can be 0 47/64047/1
kibak.yoon [Tue, 29 Mar 2016 14:03:01 +0000 (23:03 +0900)]
sensord: fix the bug about checking 0 although sensor_id can be 0

Change-Id: I6bf57b579a3aafd53d203ae9283ffd1da5955975
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agoMerge branch 'devel/tizen_3.0' into tizen 40/64040/1 accepted/tizen/common/20160330.120106 accepted/tizen/ivi/20160330.003108 accepted/tizen/mobile/20160330.003023 accepted/tizen/tv/20160330.003035 accepted/tizen/wearable/20160330.003052 submit/tizen/20160329.130832
kibak.yoon [Tue, 29 Mar 2016 13:02:46 +0000 (22:02 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0:
  sensord: fix the bug that gravity synthesize has to skip the all event except of accelerometer event

Change-Id: If82f47dc22f01467f8ad7f87c6f74a14486ed51d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: fix the bug that gravity synthesize has to skip the all event 39/64039/1
kibak.yoon [Tue, 29 Mar 2016 12:57:53 +0000 (21:57 +0900)]
sensord: fix the bug that gravity synthesize has to skip the all event
except of accelerometer event

Change-Id: I39c074b12584469c8ca5030dcbe28ee8223eaced
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: rename sensord_get_sensor_*_ex() APIs to proper names 32/63932/4
kibak.yoon [Tue, 29 Mar 2016 01:43:01 +0000 (10:43 +0900)]
sensord: rename sensord_get_sensor_*_ex() APIs to proper names

Change-Id: I19b2c7aed8a6d02249bb91d02df87291b1d18f3f
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agoMerge branch 'devel/tizen_3.0' into tizen 11/63811/1 accepted/tizen/common/20160329.050344 accepted/tizen/ivi/20160328.065825 accepted/tizen/mobile/20160328.065658 accepted/tizen/tv/20160328.065725 accepted/tizen/wearable/20160328.065759 submit/tizen/20160328.025441
kibak.yoon [Mon, 28 Mar 2016 02:37:44 +0000 (11:37 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0:
  get: increase the polling duration limit for sync read

Change-Id: Ic971950a67c398c86d41c6d2a538bec0e2d62da8
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agoget: increase the polling duration limit for sync read 60/63760/2
Mu-Woong Lee [Fri, 25 Mar 2016 14:18:00 +0000 (23:18 +0900)]
get: increase the polling duration limit for sync read

Change-Id: I02950e507446c6a69a28ceba96f6373b1d9c0bf6
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
8 years agoMerge branch 'devel/tizen_3.0' into tizen 06/63706/1 accepted/tizen/ivi/20160325.134245 accepted/tizen/mobile/20160325.134122 accepted/tizen/tv/20160325.134201 accepted/tizen/wearable/20160325.134232 submit/tizen/20160325.084051
kibak.yoon [Fri, 25 Mar 2016 08:38:41 +0000 (17:38 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0:
  sensord: remove the unnecessary checking code
  sensord: add get_sensor_*_ex internal APIs for getting error properly
  sensord: send permission-needed sensor information to client

Change-Id: Ifdf6ae692567006196c84f59ba83434bd3f334bb
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: remove the unnecessary checking code 05/63705/1
kibak.yoon [Fri, 25 Mar 2016 08:36:26 +0000 (17:36 +0900)]
sensord: remove the unnecessary checking code

Change-Id: Icc7c48acc0421bbd77b4f6f34bb3097088a3fc9d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: add get_sensor_*_ex internal APIs for getting error properly 81/63681/1
kibak.yoon [Thu, 24 Mar 2016 16:57:05 +0000 (01:57 +0900)]
sensord: add get_sensor_*_ex internal APIs for getting error properly

* if clients uses sensord_get_sensor/sensord_get_sensor_list APIs to get
  sensor handle(s), they cannot know the error exactly. because APIs
  return only bool or handle itself, not including error info.

Change-Id: I83e9c28217621a5a6ab3c5e35dd45c84a5056cea
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: send permission-needed sensor information to client 80/63680/1
kibak.yoon [Thu, 24 Mar 2016 16:48:20 +0000 (01:48 +0900)]
sensord: send permission-needed sensor information to client

* client needs to know whether the error is operation_failed or
  permission_denied. therefore server has to send all of sensor list to
  client.
* if it is previleged sensor, server sends the type information only.

Change-Id: I2563d457b0aa039ebbc3f83121aa47b18dfa06bc
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agoMerge branch 'devel/tizen_3.0' into tizen 04/63504/1 accepted/tizen/common/20160324.173054 accepted/tizen/ivi/20160324.131328 accepted/tizen/mobile/20160324.132509 accepted/tizen/tv/20160324.132358 accepted/tizen/wearable/20160324.132336 submit/tizen/20160324.083530
kibak.yoon [Thu, 24 Mar 2016 08:33:23 +0000 (17:33 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0:
  sensord: remove the error log that is not error actually

Change-Id: I2299cb0a1e751467b10a7b8ad7507ef537e7a94c
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: remove the error log that is not error actually 00/63500/1
kibak.yoon [Thu, 24 Mar 2016 08:25:12 +0000 (17:25 +0900)]
sensord: remove the error log that is not error actually

Change-Id: Ie4d83fbf60eb4d348164b2e7498855bc3eb1bbd1
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agoMerge branch 'devel/tizen_3.0' into tizen 52/62952/1 accepted/tizen/common/20160322.145625 accepted/tizen/ivi/20160322.003104 accepted/tizen/mobile/20160322.003013 accepted/tizen/tv/20160322.003030 accepted/tizen/wearable/20160322.003045 submit/tizen/20160321.103327
kibak.yoon [Mon, 21 Mar 2016 08:14:00 +0000 (17:14 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0:
  sensord: add the checker whether m_sock_fd is valid or not
  sensord: change return value from bool to int
  sensord: [Svace] change strerror to strerror_r
  sensord: [svace] change readdir to readdir_r
  sensord: add AUTO_ROTATION_SENSOR to log

Change-Id: Ied6a049aa0a48e6e1c7a22eb94ec0ea0dcaf3db9
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: add the checker whether m_sock_fd is valid or not 11/62811/2
kibak.yoon [Fri, 18 Mar 2016 11:09:54 +0000 (20:09 +0900)]
sensord: add the checker whether m_sock_fd is valid or not

Change-Id: I9b8fe4cd7825607197e618e1eede25036b1223cd
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: change return value from bool to int 57/62757/2
kibak.yoon [Fri, 18 Mar 2016 04:12:38 +0000 (13:12 +0900)]
sensord: change return value from bool to int

Change-Id: I8b6cc10e0c8ed9f126d58f3097545e64fd655f16
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: [Svace] change strerror to strerror_r 88/62688/2
kibak.yoon [Thu, 17 Mar 2016 11:10:27 +0000 (20:10 +0900)]
sensord: [Svace] change strerror to strerror_r

- make macro for strerror_r
- strerror_r returns error message that it is from buf or static string
  according to a man page

* details
"This may be either a pointer to a string that the function stores in
buf, or a pointer to some (immutable)  static  string  (ini which  case
buf is unused)."

Change-Id: Ifbca885a211e53d74e29268a25b597ff4d2897af
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: [svace] change readdir to readdir_r 87/62687/2
kibak.yoon [Thu, 17 Mar 2016 08:19:42 +0000 (17:19 +0900)]
sensord: [svace] change readdir to readdir_r

Change-Id: I3736cc026ac64efd05a9ca0b41f1a60daae3a306
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: add AUTO_ROTATION_SENSOR to log 97/62597/1
kibak.yoon [Thu, 17 Mar 2016 02:32:42 +0000 (11:32 +0900)]
sensord: add AUTO_ROTATION_SENSOR to log

Change-Id: Id1d51345cf1f563e2916a355854b7aa4eb968e03
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agoMerge branch 'devel/tizen_3.0' into tizen 05/62305/1 accepted/tizen/common/20160315.221906 accepted/tizen/ivi/20160315.124644 accepted/tizen/mobile/20160315.124540 accepted/tizen/tv/20160315.124602 accepted/tizen/wearable/20160315.124619 submit/tizen/20160315.091734
kibak.yoon [Tue, 15 Mar 2016 09:13:46 +0000 (18:13 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0:
  sensord: fix build break about using {libdir} macro instead of {unitdir} for systemd path

Change-Id: I1b0546b34f40f1d61518de621425fcd2f4aea6af
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: fix build break about using {libdir} macro instead of {unitdir} for systemd... 04/62304/2
kibak.yoon [Tue, 15 Mar 2016 09:06:35 +0000 (18:06 +0900)]
sensord: fix build break about using {libdir} macro instead of {unitdir} for systemd path

Change-Id: I8848ccc0f373f1390b0d33de54dee58c0a741b95
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agoMerge branch 'devel/tizen_3.0' into tizen 55/62255/1 submit/tizen/20160315.065646
kibak.yoon [Tue, 15 Mar 2016 04:39:00 +0000 (13:39 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0: (21 commits)
  sensord: version 2.0.3
  sensord: enable hrm/gravity/linear accel sensors
  sensord: call on_event() after invoking sensor event from fd
  sensord: add sensord_flush internal API for batching
  sensord: sync/clean up sensord source code
  hal: add/sync sensor device types
  sensord: remove set_wakeup API and implementations
  libsensord: Disable deprecated sf_* APIs
  sensord: remove sensord compiler warnings
  sensord: fix the svace issue because of using non-terminated string
  sensord: fix the bug/memory leak/inefficient code
  sensord: lazy loading atexit() because static variables is used in atexit()
  sensord: clean up the source code
  sensord: clean up boiler plates
  sensord: restructuring sensord directories
  sensord: move .service/.socket to packaging
  sensord: fix the bug that set_attribute returns bool
  sensord: if poll() is failed, return false
  sensord: change to systemd socket
  sensord: fix the bug about calling read_sensor_data
  ...

Change-Id: I28f80d3f815c4ce38b832dc9471fc787e23bcc5a
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: version 2.0.3 41/62241/1
kibak.yoon [Tue, 15 Mar 2016 04:38:08 +0000 (13:38 +0900)]
sensord: version 2.0.3

Change-Id: I611a00ecddc428613d492f4dcde289ea670fa54a
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: enable hrm/gravity/linear accel sensors 24/62224/2
kibak.yoon [Tue, 15 Mar 2016 02:52:42 +0000 (11:52 +0900)]
sensord: enable hrm/gravity/linear accel sensors

Change-Id: I9595bbcb4a0f194b06b1d1f458fb410f179afcd6
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: call on_event() after invoking sensor event from fd 22/62222/2
kibak.yoon [Tue, 15 Mar 2016 02:45:34 +0000 (11:45 +0900)]
sensord: call on_event() after invoking sensor event from fd

Change-Id: I616af576afe22cb512cfc3f8c5be76c458af7e8d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: add sensord_flush internal API for batching 20/62220/2
kibak.yoon [Tue, 15 Mar 2016 02:39:53 +0000 (11:39 +0900)]
sensord: add sensord_flush internal API for batching

Change-Id: I9ce1ec8259b7c592ce269451a74a9a018ee5700f
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: sync/clean up sensord source code 17/62217/2
kibak.yoon [Tue, 15 Mar 2016 02:33:20 +0000 (11:33 +0900)]
sensord: sync/clean up sensord source code

Change-Id: I3fa2c377700e828443ec747e226f89c6249d541f
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agohal: add/sync sensor device types 73/62173/1
kibak.yoon [Tue, 15 Mar 2016 00:58:54 +0000 (09:58 +0900)]
hal: add/sync sensor device types

Change-Id: I5b0b6eb2a5cdc9e81be1b2e47a24864c4400fc9a
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: remove set_wakeup API and implementations 68/62168/1
kibak.yoon [Tue, 15 Mar 2016 00:24:19 +0000 (09:24 +0900)]
sensord: remove set_wakeup API and implementations

Change-Id: I4ee5cdcbb06d97539fb163f604863722c4a2d10f
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agolibsensord: Disable deprecated sf_* APIs 82/59482/5
Mu-Woong Lee [Tue, 16 Feb 2016 04:06:42 +0000 (13:06 +0900)]
libsensord: Disable deprecated sf_* APIs

The functions just return -1.

Change-Id: I76a78ca9d2d84affbc43562fd3e37ec604e7525f
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
8 years agosensord: remove sensord compiler warnings 49/61249/1
kibak.yoon [Mon, 7 Mar 2016 04:15:52 +0000 (13:15 +0900)]
sensord: remove sensord compiler warnings

Change-Id: I2a8136c8bdd25fad9a6824ddbbff7c90ec26c529
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: fix the svace issue because of using non-terminated string 19/60919/1
kibak.yoon [Thu, 3 Mar 2016 03:05:46 +0000 (12:05 +0900)]
sensord: fix the svace issue because of using non-terminated string

Change-Id: Ibcbee0bac176f72c647639f8fb950dca1cf8fe70
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: fix the bug/memory leak/inefficient code 65/60865/3
kibak.yoon [Wed, 2 Mar 2016 14:51:17 +0000 (23:51 +0900)]
sensord: fix the bug/memory leak/inefficient code

- clean up the source code

Change-Id: I11a5c3922b4c2f287910076580f426c1b9832d4f
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: lazy loading atexit() because static variables is used in atexit() 64/60864/1
kibak.yoon [Wed, 2 Mar 2016 14:38:31 +0000 (23:38 +0900)]
sensord: lazy loading atexit() because static variables is used in atexit()

- if atexit() is called before the declaration of static variables,
  they can be released while the registered callback is processing.
- so atexit() function has to be called lazily.

Change-Id: I2feef2013d01470559ad51f8712fbd8ea9f2ae02
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: clean up the source code 63/60863/1
kibak.yoon [Wed, 2 Mar 2016 14:35:51 +0000 (23:35 +0900)]
sensord: clean up the source code

- syntax / coding style
- clean up including header files
- remove compiler warning
- remove useless lines/white space
- correct typing-errors
- sync with private source

Change-Id: I4abce149946aa4cf3a81296a88cb6288a71c1ced
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: clean up boiler plates 59/60859/1
kibak.yoon [Wed, 2 Mar 2016 13:49:00 +0000 (22:49 +0900)]
sensord: clean up boiler plates

Change-Id: I4740cd857c6b2b8c2f53bd0a14fa750c23c69de2
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: restructuring sensord directories 58/60858/1
kibak.yoon [Wed, 2 Mar 2016 13:41:10 +0000 (22:41 +0900)]
sensord: restructuring sensord directories

- src/server/plugins -> src/sensor
- modify CMakeLists.txt

Change-Id: I253b84e4dda7cc2cd4f62ca8e4b310be247881a6
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: move .service/.socket to packaging 57/60857/1
kibak.yoon [Wed, 2 Mar 2016 13:29:15 +0000 (22:29 +0900)]
sensord: move .service/.socket to packaging

Change-Id: Iaea00fe48fed8c44e20c24efbfc088e0c16f9cf9
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agoMerge "sensord: change to systemd socket" into devel/tizen_3.0
Mu-Woong Lee [Mon, 22 Feb 2016 01:04:29 +0000 (17:04 -0800)]
Merge "sensord: change to systemd socket" into devel/tizen_3.0

8 years agoMerge "sensord: fix the bug about calling read_sensor_data" into devel/tizen_3.0
Mu-Woong Lee [Mon, 22 Feb 2016 00:59:27 +0000 (16:59 -0800)]
Merge "sensord: fix the bug about calling read_sensor_data" into devel/tizen_3.0

8 years agosensord: fix the bug that set_attribute returns bool 61/59961/2
kibak.yoon [Sat, 20 Feb 2016 10:10:00 +0000 (19:10 +0900)]
sensord: fix the bug that set_attribute returns bool

Change-Id: I63e0683bcd2fbb0f207522ec4003b05081eb5fe5
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: if poll() is failed, return false 60/59960/2
kibak.yoon [Sat, 20 Feb 2016 09:57:08 +0000 (18:57 +0900)]
sensord: if poll() is failed, return false

Change-Id: I74db7758d198f65265f982d3b72ebb5df1af705f
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: change to systemd socket 59/59959/2
kibak.yoon [Sat, 20 Feb 2016 09:54:42 +0000 (18:54 +0900)]
sensord: change to systemd socket

- use systemd socket for event socket

Change-Id: Ib18c94092aa9cd93b097ee270a40220d17d7e0ab
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: fix the bug about calling read_sensor_data 58/59958/1
kibak.yoon [Sat, 20 Feb 2016 08:29:39 +0000 (17:29 +0900)]
sensord: fix the bug about calling read_sensor_data

* separate remain_count from state

Change-Id: Ie36edd11e33f6b30230c05671d865f84716ed5e9
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: rename sensor_logs.h to sensor_log.h 44/59544/1
kibak.yoon [Tue, 16 Feb 2016 10:26:12 +0000 (19:26 +0900)]
sensord: rename sensor_logs.h to sensor_log.h

Change-Id: I33e5d86bc0abc60ab83195902dffd6953dd9ed26
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agoMerge branch 'devel/tizen_3.0' into tizen 98/59498/1 accepted/tizen/mobile/20160216.102843 accepted/tizen/tv/20160216.102905 accepted/tizen/wearable/20160216.102926 submit/tizen/20160216.061016 submit/tizen_common/20160218.142243
kibak.yoon [Tue, 16 Feb 2016 05:38:16 +0000 (14:38 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0:
  sensord: delete the removing symlink code
  client: fix initialization issue

Change-Id: I5e15721392551e6d4392a1a43687f1ea327a5f7d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: delete the removing symlink code 86/59486/1
kibak.yoon [Tue, 16 Feb 2016 04:37:47 +0000 (13:37 +0900)]
sensord: delete the removing symlink code

Change-Id: Ifc1746ecceb21def7c253d05d28a8b50dcf55c23
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agoclient: fix initialization issue 76/59476/2
Mu-Woong Lee [Tue, 16 Feb 2016 02:07:30 +0000 (11:07 +0900)]
client: fix initialization issue

Change-Id: I33428ba68b0937dc9c9c294e84640d04e625b9b3
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
8 years agoMerge branch 'devel/tizen_3.0' into tizen 22/59422/1
kibak.yoon [Mon, 15 Feb 2016 10:42:45 +0000 (19:42 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0: (51 commits)
  sensord: version 2.0.2
  sensord: rename sensor_handle_t to sensor_info_t
  sensord: fix the bug that uses wrong type if sensor is UNKNOWN_SENSOR
  sensord: add the sensord plugin logic for flexibility
  shared: re-assign sensor type numbers to activity/gesture sensors
  sensord: change macros for log
  sensord: clean up sf_common.h/sensor_common.h/sensor_logs.h
  sensord: add set_attribute_* API for internal
  sensord: remove useless the type-casting
  sensord: create sensor-hal-devel package
  sensord: clean up spec/pc/cmakelists.txt
  sensord: change the interface of set_attribute_*
  sensord: change the type of hal id to int32_t
  sensord: change the HAL interface
  sensord: clean up sensor fw code
  sensord: fix build error
  sensord: unify code style for class brackets
  sensord: enable sensor-test
  sensord: modify HAL interface for batching
  sensord: remove unused parameter
  ...

Change-Id: I024a057b5650ae6e023863d25dd349f07d4d435d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: version 2.0.2 14/59414/1
kibak.yoon [Mon, 15 Feb 2016 10:07:14 +0000 (19:07 +0900)]
sensord: version 2.0.2

Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Change-Id: I569796bc25b5d1bc7d4b54df1a6004593cc012aa

8 years agosensord: rename sensor_handle_t to sensor_info_t 08/59408/1
kibak.yoon [Mon, 15 Feb 2016 09:50:42 +0000 (18:50 +0900)]
sensord: rename sensor_handle_t to sensor_info_t

Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Change-Id: I276dcdee7cbe8011e572194c573d036dfaea8433

8 years agoMerge "sensord: fix the bug that uses wrong type if sensor is UNKNOWN_SENSOR" into...
Mu-Woong Lee [Mon, 15 Feb 2016 09:45:04 +0000 (01:45 -0800)]
Merge "sensord: fix the bug that uses wrong type if sensor is UNKNOWN_SENSOR" into devel/tizen_3.0

8 years agosensord: fix the bug that uses wrong type if sensor is UNKNOWN_SENSOR 99/59399/1
kibak.yoon [Mon, 15 Feb 2016 09:25:23 +0000 (18:25 +0900)]
sensord: fix the bug that uses wrong type if sensor is UNKNOWN_SENSOR

Change-Id: I598273ed1aa34c8c6417b2bc3469d175f1d62722
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agoMerge "sensord: add the sensord plugin logic for flexibility" into devel/tizen_3.0
Mu-Woong Lee [Mon, 15 Feb 2016 08:58:45 +0000 (00:58 -0800)]
Merge "sensord: add the sensord plugin logic for flexibility" into devel/tizen_3.0

8 years agosensord: add the sensord plugin logic for flexibility 49/59349/6
kibak.yoon [Sat, 13 Feb 2016 08:43:32 +0000 (17:43 +0900)]
sensord: add the sensord plugin logic for flexibility

- if sensord has specific-type sensor plugin, then sensor_loader
  creates specific-type sensor object and set the handle info to it.
- but sensord doesn't have specific-type sensor plugin based on
  physical_sensor, sensor_loader creates physical_sensor object
  basically and use it.

Change-Id: Iceb5047d6db660c36a63d9deda1c45518eb24570
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agoshared: re-assign sensor type numbers to activity/gesture sensors 60/59360/1
Mu-Woong Lee [Mon, 15 Feb 2016 05:22:58 +0000 (14:22 +0900)]
shared: re-assign sensor type numbers to activity/gesture sensors

Change-Id: Id49aa8d47d420ad511b477444084c9642fec19a3
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
8 years agosensord: change macros for log 46/59346/1
kibak.yoon [Sat, 13 Feb 2016 05:48:24 +0000 (14:48 +0900)]
sensord: change macros for log

- use _E/_I/_D/_W

Change-Id: Ibd73416a4e00a8c739d4793f5ecded6c2f4e7fc3
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: clean up sf_common.h/sensor_common.h/sensor_logs.h 45/59345/2
kibak.yoon [Sat, 13 Feb 2016 05:42:13 +0000 (14:42 +0900)]
sensord: clean up sf_common.h/sensor_common.h/sensor_logs.h

- add command_common.h for command macro/struct/enum
- clean up sensor_logs.h also

Change-Id: I4241a7cf7955df79bfb54ea5fb3777da50e76adb
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: add set_attribute_* API for internal 44/59344/3
kibak.yoon [Sat, 13 Feb 2016 04:14:10 +0000 (13:14 +0900)]
sensord: add set_attribute_* API for internal

Change-Id: I4e9c058f80e37b7067823fc1ff3b543010365852
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: remove useless the type-casting 42/59342/2
kibak.yoon [Sat, 13 Feb 2016 02:31:04 +0000 (11:31 +0900)]
sensord: remove useless the type-casting

Change-Id: I174a36bc3e773a5920c6ea6354dfb34add7054d4
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: create sensor-hal-devel package 35/59335/4
kibak.yoon [Fri, 12 Feb 2016 14:48:06 +0000 (23:48 +0900)]
sensord: create sensor-hal-devel package

- sensor-hal-devel package installs sensor.h only
- remove sensorhub-related code

Change-Id: Ic1486cf9e3661ff9ef6103678f878e53cc94539a
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: clean up spec/pc/cmakelists.txt 31/59331/4
kibak.yoon [Fri, 12 Feb 2016 14:48:06 +0000 (23:48 +0900)]
sensord: clean up spec/pc/cmakelists.txt

Change-Id: I4e2a505d281e8ba23137e72bdb9ee4ab26ef9fe2
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: change the interface of set_attribute_* 87/59287/1
kibak.yoon [Fri, 12 Feb 2016 06:46:04 +0000 (15:46 +0900)]
sensord: change the interface of set_attribute_*

Change-Id: I60871bfa07a0acd87f231b425259e7c842958410
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
8 years agosensord: change the type of hal id to int32_t 83/59283/1
kibak.yoon [Fri, 12 Feb 2016 06:06:38 +0000 (15:06 +0900)]
sensord: change the type of hal id to int32_t

Change-Id: I5caa05382f7be7c0e146aa7413eee1f321333a3e
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>