\hypertarget{Eeze__Sensor_8h}{}\doxysection{Eeze\+\_\+\+Sensor.\+h File Reference}
\label{Eeze__Sensor_8h}\index{Eeze\_Sensor.h@{Eeze\_Sensor.h}}


Sensor information subsystem.  


\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{struct__Eeze__Sensor__Obj}{\+\_\+\+Eeze\+\_\+\+Sensor\+\_\+\+Obj}}
\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \mbox{\hyperlink{struct__Eeze__Sensor__Obj}{\+\_\+\+Eeze\+\_\+\+Sensor\+\_\+\+Obj}} \mbox{\hyperlink{group__Eeze__Sensor_gab0394cc35fc90bc49629f775ebb4d88f}{Eeze\+\_\+\+Sensor\+\_\+\+Obj}}
\begin{DoxyCompactList}\small\item\em Object for a sensor type. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{group__Eeze__Sensor_gaf03bb0fb995a5d05ea33460bf9f8daea}{Eeze\+\_\+\+Sensor\+\_\+\+Type}} \{ \newline
\mbox{\hyperlink{group__Eeze__Sensor_ggaf03bb0fb995a5d05ea33460bf9f8daeaab5734e85b7463a7baa74b2148d0a89ad}{EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+ACCELEROMETER}}
, \newline
\mbox{\hyperlink{group__Eeze__Sensor_ggaf03bb0fb995a5d05ea33460bf9f8daeaac65971560c7e0b0170a7a7c1d31f9316}{EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+GRAVITY}}
, \newline
{\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+LINEAR\+\_\+\+ACCELERATION}
, \newline
{\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+DEVICE\+\_\+\+ORIENTATION}
, \newline
\mbox{\hyperlink{group__Eeze__Sensor_ggaf03bb0fb995a5d05ea33460bf9f8daeaa66def9b494a1ebd0d1c88e9d1edbffac}{EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+MAGNETIC}}
, \newline
\mbox{\hyperlink{group__Eeze__Sensor_ggaf03bb0fb995a5d05ea33460bf9f8daeaaff827be42f0c6852197e4e2463fb469b}{EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+ORIENTATION}}
, \newline
\mbox{\hyperlink{group__Eeze__Sensor_ggaf03bb0fb995a5d05ea33460bf9f8daeaa844f734531c1f88486922514fd1f9b63}{EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+GYROSCOPE}}
, \newline
\mbox{\hyperlink{group__Eeze__Sensor_ggaf03bb0fb995a5d05ea33460bf9f8daeaa03726e92921df1e1305666e1cbbe6cac}{EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+LIGHT}}
, \newline
\mbox{\hyperlink{group__Eeze__Sensor_ggaf03bb0fb995a5d05ea33460bf9f8daeaa15e9f5125644fb52d04c1ca851d57de7}{EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+PROXIMITY}}
, \newline
\mbox{\hyperlink{group__Eeze__Sensor_ggaf03bb0fb995a5d05ea33460bf9f8daeaa3a027e95ae5962c764d27f2b0f267479}{EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+MOTION\+\_\+\+SNAP}}
, \newline
\mbox{\hyperlink{group__Eeze__Sensor_ggaf03bb0fb995a5d05ea33460bf9f8daeaa84eb56f11a15af4cb2f29bb909d968b1}{EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+MOTION\+\_\+\+SHAKE}}
, \newline
\mbox{\hyperlink{group__Eeze__Sensor_ggaf03bb0fb995a5d05ea33460bf9f8daeaad4db0f20159f1248c5391d28614b7553}{EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+MOTION\+\_\+\+DOUBLETAP}}
, \newline
\mbox{\hyperlink{group__Eeze__Sensor_ggaf03bb0fb995a5d05ea33460bf9f8daeaa14f7ad62b6f2fcc251abc03ffc84c7ad}{EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+MOTION\+\_\+\+PANNING}}
, \newline
{\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+MOTION\+\_\+\+PANNING\+\_\+\+BROWSE}
, \newline
{\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+MOTION\+\_\+\+TILT}
, \newline
\mbox{\hyperlink{group__Eeze__Sensor_ggaf03bb0fb995a5d05ea33460bf9f8daeaab0b8bd3befe83f130101a7d064cc0ee9}{EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+MOTION\+\_\+\+FACEDOWN}}
, \newline
{\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+MOTION\+\_\+\+DIRECT\+\_\+\+CALL}
, \newline
{\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+MOTION\+\_\+\+SMART\+\_\+\+ALERT}
, \newline
{\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+MOTION\+\_\+\+NO\+\_\+\+MOVE}
, \newline
\mbox{\hyperlink{group__Eeze__Sensor_ggaf03bb0fb995a5d05ea33460bf9f8daeaa8f82d74661377e2fc78d3c4b663e4962}{EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+BAROMETER}}
, \newline
\mbox{\hyperlink{group__Eeze__Sensor_ggaf03bb0fb995a5d05ea33460bf9f8daeaabb5c6cf2ed4485753c8a08c513ec019e}{EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+TEMPERATURE}}
, \newline
\mbox{\hyperlink{group__Eeze__Sensor_ggaf03bb0fb995a5d05ea33460bf9f8daeaae918a8b0fbfc7a178b7955416c5aba1f}{EEZE\+\_\+\+SENSOR\+\_\+\+TYPE\+\_\+\+LAST}} = 0x\+FF
 \}
\begin{DoxyCompactList}\small\item\em All sensor types known by Eeze Sensor. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
EAPI \mbox{\hyperlink{group__Eeze__Sensor_gab0394cc35fc90bc49629f775ebb4d88f}{Eeze\+\_\+\+Sensor\+\_\+\+Obj}} $\ast$ \mbox{\hyperlink{group__Eeze__Sensor_gab694c0d33d8a43e81dca0ec566a14d5d}{eeze\+\_\+sensor\+\_\+new}} (\mbox{\hyperlink{group__Eeze__Sensor_gaf03bb0fb995a5d05ea33460bf9f8daea}{Eeze\+\_\+\+Sensor\+\_\+\+Type}} type)
\begin{DoxyCompactList}\small\item\em Create sensor object to operate on. \end{DoxyCompactList}\item 
EAPI void \mbox{\hyperlink{group__Eeze__Sensor_gaea6e5bc74e6f13cdce43730af33dc4e4}{eeze\+\_\+sensor\+\_\+free}} (\mbox{\hyperlink{group__Eeze__Sensor_gab0394cc35fc90bc49629f775ebb4d88f}{Eeze\+\_\+\+Sensor\+\_\+\+Obj}} $\ast$sens)
\begin{DoxyCompactList}\small\item\em Free a sensor object. \end{DoxyCompactList}\item 
EAPI \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eeze__Sensor_gabd8faf47001fb0aa6f624086a959faf1}{eeze\+\_\+sensor\+\_\+accuracy\+\_\+get}} (\mbox{\hyperlink{group__Eeze__Sensor_gab0394cc35fc90bc49629f775ebb4d88f}{Eeze\+\_\+\+Sensor\+\_\+\+Obj}} $\ast$sens, int $\ast$accuracy)
\begin{DoxyCompactList}\small\item\em Get accuracy from sensor object. \end{DoxyCompactList}\item 
EAPI \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eeze__Sensor_ga0cdc85c090da844c1421012283b385d8}{eeze\+\_\+sensor\+\_\+xyz\+\_\+get}} (\mbox{\hyperlink{group__Eeze__Sensor_gab0394cc35fc90bc49629f775ebb4d88f}{Eeze\+\_\+\+Sensor\+\_\+\+Obj}} $\ast$sens, float $\ast$x, float $\ast$y, float $\ast$z)
\begin{DoxyCompactList}\small\item\em Get data from all three data properties. \end{DoxyCompactList}\item 
EAPI \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eeze__Sensor_ga66fd695d6b7a6fa1090776deac58e387}{eeze\+\_\+sensor\+\_\+xy\+\_\+get}} (\mbox{\hyperlink{group__Eeze__Sensor_gab0394cc35fc90bc49629f775ebb4d88f}{Eeze\+\_\+\+Sensor\+\_\+\+Obj}} $\ast$sens, float $\ast$x, float $\ast$y)
\begin{DoxyCompactList}\small\item\em Get data from first two data properties. \end{DoxyCompactList}\item 
EAPI \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eeze__Sensor_ga119b0c8179a7dd89cb52da11a16ea419}{eeze\+\_\+sensor\+\_\+x\+\_\+get}} (\mbox{\hyperlink{group__Eeze__Sensor_gab0394cc35fc90bc49629f775ebb4d88f}{Eeze\+\_\+\+Sensor\+\_\+\+Obj}} $\ast$sens, float $\ast$x)
\begin{DoxyCompactList}\small\item\em Get the data from first data property. \end{DoxyCompactList}\item 
EAPI \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eeze__Sensor_ga501b5311448e7e1db0a11583cb6e6ea6}{eeze\+\_\+sensor\+\_\+timestamp\+\_\+get}} (\mbox{\hyperlink{group__Eeze__Sensor_gab0394cc35fc90bc49629f775ebb4d88f}{Eeze\+\_\+\+Sensor\+\_\+\+Obj}} $\ast$sens, double $\ast$timestamp)
\begin{DoxyCompactList}\small\item\em Get timestamp from sensor object. \end{DoxyCompactList}\item 
EAPI \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eeze__Sensor_ga7afba716bf29528516aca57a24131da6}{eeze\+\_\+sensor\+\_\+read}} (\mbox{\hyperlink{group__Eeze__Sensor_gab0394cc35fc90bc49629f775ebb4d88f}{Eeze\+\_\+\+Sensor\+\_\+\+Obj}} $\ast$sens)
\begin{DoxyCompactList}\small\item\em Read out sensor data. \end{DoxyCompactList}\item 
EAPI \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eeze__Sensor_ga2cb4b33f407c8f3ddea18ffebbd17155}{eeze\+\_\+sensor\+\_\+async\+\_\+read}} (\mbox{\hyperlink{group__Eeze__Sensor_gab0394cc35fc90bc49629f775ebb4d88f}{Eeze\+\_\+\+Sensor\+\_\+\+Obj}} $\ast$sens, void $\ast$user\+\_\+data)
\begin{DoxyCompactList}\small\item\em Asynchronous read out sensor data. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+ACCELEROMETER}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+GRAVITY}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+LINEAR\+\_\+\+ACCELERATION}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+DEVICE\+\_\+\+ORIENTATION}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+MAGNETIC}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+ORIENTATION}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+GYROSCOPE}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+LIGHT}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+PROXIMITY}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+SNAP}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+SHAKE}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+DOUBLETAP}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+PANNING}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+PANNING\+\_\+\+BROWSE}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+TILT}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+FACEDOWN}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+DIRECT\+\_\+\+CALL}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+SMART\+\_\+\+ALERT}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+NO\+\_\+\+MOVE}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+BAROMETER}
\item 
EAPI int {\bfseries EEZE\+\_\+\+SENSOR\+\_\+\+EVENT\+\_\+\+TEMPERATURE}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Sensor information subsystem. 

Eeze sensor functions allow you to gather sensor information from different sensor sources available on your hardware. It supports a plugin architecture to support different hardware platforms and devices. These plugins can be loaded at runtime.

Right now we have support for the Tizen sensor framework as well as a simple fake plugin to be used as a test harness for development. Plugins for other sensor frameworks or platforms are always welcome.

Synchronous as well as asynchronous reads are possible. As reading the physical sensor might be bound to a high latency and thus cost the value of the last read is cached within Eeze\+\_\+\+Sensor together with a timestamp of the actual read out. This can speed up the value access for application while the values are still getting updating asynchronously in the background. The timestamp should be checked if the specific time requirements are needed.

As an alternative the sensor could be read synchronously. With the disadvantage that the function call will block until the data is read from the sensor.

\begin{DoxySince}{Since}
1.\+8 
\end{DoxySince}
