Sensor Framework - MeeGo Conference 2010

saucecopywriterInternet and Web Development

Feb 2, 2013 (4 years and 7 months ago)

235 views

Sensor Framework Walkthrough / Meego 2010

SENSOR
FRAMEWORK
WALKTHROUGH

Meego 2010 / Dublin


Timo Rongas

Antti Virtanen

Sensor Framework Walkthrough / Meego2010

2

AGENDA

1.
What is SensorFW?

2.
Goals

3.
Structure


Filters


Adaptors


Sensors


Chains

4.
Putting it all together


5.
Plug
-
ins

6.
Metadata

7.
Power management

8.
Application APIs

9.
Future visions

10.
Questions?

Sensor Framework Walkthrough / Meego2010

3

Sensor Framework Walkthrough / Meego2010

4


Abstracting sensors to common API


QtMobility
-
Sensors.


Preprocessing and refining sensor data


Providing “logical sensors”


Sharing common processing


Managing sensor power states


GOALS

Sensor Framework Walkthrough / Meego2010

5


A graph from nodes


Three node types


Adaptors


Chains


Sensors


Filters


STRUCTURE AND ELEMENTS

Sensor Framework Walkthrough / Meego2010

6


Only things that modify data in any way


Filtering data


Modifying data


Calculating new values based on data



Can be connected to form chains


Splitting / merging also possible



Examples


FILTERS

Sensor Framework Walkthrough / Meego2010

7

FILTER EXAMPLES

Sensor Framework Walkthrough / Meego2010

8

ADAPTORS


Adapt driver interface to
sensor framework


First things to create for
new sensors


Ready base


SelectMode (epoll)


IntervalMode (sleep)


1
-
n output buffers


Responsible for providing
HW metadata


Sensor Framework Walkthrough / Meego2010

9

SENSORS


Provides client interface


Can contain filters


Can provide


Raw data


Processed data


Created data


“logical sensor”


Sensor Framework Walkthrough / Meego2010

10

CHAINS


Container for a collection of
filters


Provides common
processing


Examples of current chains


Orientation


Accelerometer


Magnetometer calibration





Sensor Framework Walkthrough / Meego2010

11


Sensor is requested by the client application



Sensor loads/instantiates its source nodes and
filters


Each source node does the same


Only previous layer is visible to any node



Nodes are always shared


Reference counted


Exist only when required


Filters may have multiple instances


PUTTING IT ALL TOGETHER

Sensor Framework Walkthrough / Meego2010

12

CURRENT STATE

Sensor Framework Walkthrough / Meego2010

13


A plug
-
in may contain a number of nodes and
filters


Commonly 1/plug
-
in


Registers contained classes to framework


Name and dependencies


Dependencies are configurable


Dependency to Accelerometer Adaptor
implementation can be resolved as Accelerometer
-
ascii, Accelerometer
-
evdev, ...


PLUG
-
INS

Sensor Framework Walkthrough / Meego2010

14


Property of node


Description, Interval, Data range, …


Data range: first
-
come, first
-
served


Interval: Highest bidder wins


Interval example:


Client A and Client B request processed data X.


Client A requests 5hz rate, client B requests 10hz
rate


HW runs/polled at 10hz rate


Data gets processed with 10hz rate


Client A gets 5hz (down
-
sampled), client B 10hz
(direct)


METADATA

Sensor Framework Walkthrough / Meego2010

15


Single point of access


Centralized power state management


Sensors running on requirement basis


Multiple clients, data processed once


Minimizing overall overhead for sensor use


Force power down of sensors


Display blank (configurable by client)


Power save mode


High power consuming features disabled.


POWER MANAGEMENT

Sensor Framework Walkthrough / Meego2010

16

Sensor Framework Walkthrough / Meego2010

17


Primary API: QtMobility
-
sensors


Additional API (Meego only): QmSystem2



Bindings to other languages needed?


Use cases for c / python / ruby / ....



SensorFW headers are not a part of Meego API.

APPLICATION APIS

Sensor Framework Walkthrough / Meego2010

18

Future visions ?

Sensor Framework Walkthrough / Meego2010

19


Meego
-
dev:
http://lists.meego.com/listinfo/meego
-
dev


Bugzilla:
http://bugs.meego.com


Gitorious:
http://meego.gitorious.org/meego
-
middleware/sensorfw


Latest QtMobility:
http://doc.qt.nokia.com/qt
-
mobility
-
snapshot/


QtMobility JIRA:
http://bugreports.qt.nokia.com/browse/


LINKS FOR GETTING STARTED

Sensor Framework Walkthrough / Meego2010

20


Timo Rongas

timo.rongas@digia.com


Antti Virtanen

antti.i.virtanen@nokia.com


Semi Malinen

semi.malinen@nokia.com


Pia Niemelä

pia.s.niemela@nokia.com



Markus Lehtonen
markus.lehtonen@nokia.com



meego
-
dev@meego.com


CONTACTS

Sensor Framework Walkthrough / Meego2010

21

Questions ?