Skip to content

Android wiselib

vasilakis edited this page May 23, 2011 · 5 revisions

The Wiselib is an algorithm library for sensor networks. It contains various algorithm classes (for instance, localization or routing) that can be compiled for several sensor network platforms such as iSense or Contiki, or the sensor network simulator Shawn. It is completely written in C++, and uses templates in the same way as Boost and CGAL. This makes it possible to write generic and platform independent code that is very efficiently compiled for the various platforms.

On the other hand [Android](http://en.wikipedia.org/wiki/Android_(operating_system)) delivers a complete set of software for mobile devices: an operating system, middleware and key mobile applications. Android's mobile operating system is based on a modified version of the Linux kernel.The Android open-source software stack consists of Java applications running on a Java-based, object-oriented application framework on top of Java core libraries running on a [Dalvik](http://en.wikipedia.org/wiki/Dalvik_(software)) virtual machine featuring JIT compilation. Although most applications are written in java code, libraries written in C, C++ and other languages can be compiled to ARM native code and installed using the Android Native Development Kit. Native classes can be called from Java code running under the Dalvik VM using the System.loadLibrary call, which is part of the standard Android Java classes. Complete applications can be compiled and installed using traditional development tools. ARM code can be compiled using GCC on a standard linux machine.

This wiki describes the new algorithm classes that have been created for the port of wiselib library to the android platform. Until know these are the implemented classes:

AndrDebug: Provides one of the most useful debug functions..well a compatible printf() function with the difference that the output is appeared in an alarm box of the running application.

AndroidClockModel: Provides useful functions that accept a time_t(unix timeval) struct and returns the seconds, microseconds or the milliseconds.

AndroidTimerModel: Implement function callbacks using template functors and a timer that will schedule these callbacks.

How to compile a code using wiselib: A tutorial that shows how you can easily compile a source code for android ndk using wiselib implemented classes.