#include <stdbool.h>
#include <stdint.h>
#include <time.h>
-#include <tizen.h>
#define SENSOR_HAL_VERSION(maj, min) ((((maj)&0xFFFF) << 24) | ((min)&0xFFFF))
SENSOR_DEVICE_HUMAN_SLEEP_DETECTOR,
SENSOR_DEVICE_HUMAN_STRESS_MONITOR,
+ SENSOR_DEVICE_LIDAR = 1000,
+
SENSOR_DEVICE_EXERCISE_WALKING = 0x400,
SENSOR_DEVICE_EXERCISE_RUNNING,
SENSOR_DEVICE_EXERCISE_HIKING,
SENSOR_DEVICE_PPG,
} sensor_device_type;
-/**
- * @brief Enumeration for errors.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- */
-typedef enum {
- SENSOR_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
- SENSOR_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
- SENSOR_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
- SENSOR_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
- SENSOR_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
- SENSOR_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
- SENSOR_ERROR_NO_DATA = TIZEN_ERROR_NO_DATA, /**< No data available
- @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif */
- SENSOR_ERROR_NOT_NEED_CALIBRATION = TIZEN_ERROR_SENSOR | 0x03, /**< Sensor doesn't need calibration */
- SENSOR_ERROR_OPERATION_FAILED = TIZEN_ERROR_SENSOR | 0x06, /**< Operation failed */
- SENSOR_ERROR_NOT_AVAILABLE = TIZEN_ERROR_SENSOR | 0x07, /**< The sensor is supported, but currently not available
- @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif */
-} sensor_error_e;
-
/*
* A platform sensor handler is generated based on this handle
* This id can be assigned from HAL developer. so it has to be unique in 1
float max_range;
float resolution;
int min_interval;
+ int max_interval;
int max_batch_count;
bool wakeup_supported;
} sensor_info_t;
CONVERT_TYPE_ATTR(SENSOR_DEVICE_FALL_DETECTION, 0x1),
};
+enum sensor_attribute_common {
+ SENSOR_ATTR_COMMON_START = 0x1000000,
+ SENSOR_ATTR_POWER_STATE = SENSOR_ATTR_COMMON_START + 10001,
+};
+
enum sensor_activity {
SENSOR_ACTIVITY_UNKNOWN = 1,
SENSOR_ACTIVITY_STILL = 2,
int32_t value) {
return true;
}
- virtual bool set_attribute_str(uint32_t id, int32_t attribute, char *value,
+ virtual bool set_attribute_str(uint32_t id, int32_t attribute, const char *value,
int len) {
return true;
}
+ virtual bool get_attribute_int(uint32_t id, int32_t attribute,
+ int32_t *value) {
+ return true;
+ }
+ virtual bool get_attribute_str(uint32_t id, int32_t attribute, char **value,
+ int *len) {
+ return true;
+ }
+
virtual bool flush(uint32_t id) { return true; }
};