Mobile Sensor Actuator Gateway On Labs
-
Upload
tor-bjoern-minde -
Category
Technology
-
view
1.320 -
download
0
description
Transcript of Mobile Sensor Actuator Gateway On Labs
Mobile Sensor Actuator Gateway
A labs.ericsson.com APIhttps://labs.ericsson.com/apis/sensor-networking-application-platform/
2
Mobile Sensor Actuator Gateway
Use the Android SDK to develop applications using the on-board sensors of your mobile phone
Easy to use API for retrieving the descriptions and data of the on-board sensors in standardized formats
Mobile Sensor Actuator Gateway uses OGC SWE SensorMLfor descriptions and OGC Observations & Measurements for data
3
Why Mobile Sensor Actuator Gateway?
Devices like mobiles are used everywhere and many now are instrumented with a variety of sensors & actuators
Low-level Android APIs do not provide sensor information in a high-level, industry standard format
Mobile Sensor Actuator Gateway (MSAG) provides simple APIs that are lightweight and straightforward for developers to use
MSAG from Ericsson Labs is a sensor & actuator API tailored for rapid prototyping of sensor applications
4
Main Features of MSAG
API provides two main calls:
– Get sensor descriptions in OGC SWE SensorML format
– Get sensor data in OGC Observations & Measurement format
MSAG supports the following on-board sensors:
– Temperature
– Orientation
– Magnetic field
– Accelerometer
API also contains a cache for storage of historical data
All sensor readings are geotagged & timestamped
5
MSAG SDK examples
Use the sensor descriptions and data from the phone to render sensor information on a map (see Ericsson Mobile Maps)
6
MSAG overview
AIDL Interface: Android IPC system
ServiceConnection: provides IPC interface
Auto-generated stub: provides application API
7
public void getOperationCode() throws RemoteException {
/** Code for showing data on screen */
if( op_code == SHOW_DESC ){
checkCallingPermission( "ericsson.msag.Communicator" );
/** One of the methods of the Communicator interface */
res = communicator.getDesc();
/** Unbind service and disconnect */
unbindService( conn );
}else if( op_code == SHOW_DATA ) {
checkCallingPermission( "ericsson.msag.Communicator" );
/** Another method of the Communicator interface */
res = communicator.getData();
/** Unbind service and disconnect */
unbindService( conn );
}else {
res = null;
}
}
MSAG Client API
Library that is easily included in your Android mobile application
Supports Android phones with version 1.5 and later
Example code below shows getDesc() and getData() methods
8