190 likes | 211 Views
Wiselib is a code library of algorithms for heterogeneous sensor networks, offering highly efficient solutions with a focus on generic programming and flexible design. It supports standard language features and object-oriented programming.
E N D
Wiselib: A Generic Algorithm Library for Heterogeneous Sensor Networks* Tobias Baumgartner 1, Ioannis Chatzigiannakis 2, Sándor Fekete 1, Christos Koninis 2, Alexander Kröller 1, Apostolos Pyrgelis 2 1 Braunschweig Institute of Technology, IBR, Algorithms Group, Germany 2 Research Academic Computer Technology Institute, Patras, Greece * Supported by the EU-project WISEBED – http://wisebed.eu
Motivation Architecture Experimental Results Wiselib Usage Outlook
What is the Wiselib? • Code library of Algorithms • Heterogeneous • Highly Efficient
Motivation Architecture Experimental Results Wiselib Usage Outlook
The Wiselib Templates Standard Language Features C++ • Generic Programming • Flexible Design • Well-known constructs • No custom language extensions • Similar to STL, Boost, CGAL • Object-Oriented Programming
Example classiSenseRadioModel { static void enable() { ... }; } classShawnRadioModel { static void enable() { ... }; } template<typenameRadio> classAlgorithm { void enable() { Radio::enable(); } }; Algorithm<iSenseRadioModel> algorithm_isense; Algorithm<ShawnRadioModel> algorithm_shawn; concept Radio { static void enable(); } A concept only exists in documentation. It describes exactly how an implementation must look like. A model is an implementation of a concept. It offers at least each method and each type that is described in the concept. Another implementation awaits a model as template parameter, but knows only the concept. Such a model is then passed as a template argument to an algorithm
External Architecture 8 OS Description. Data types and standard configuration. Radios. Send and receive messages. Specializations of standard radio. Timer. Event registration. Debug. Print out debug/logging messages. Serial Interface. Write to serial port. E.g. for exchanging data with PC. Clock. Provide current time.
Algorithms 9 Clustering. Build groups of nodes, each with own cluster-head. Here, it is also possible to combine such an algorithm with crypto. Network Metrics. Collect metrics for (parts of) the network. Currently, link stability in one-hop neighborhood and individual links can be evaluated. Localization. Provide position for nodes. Can also be abstract positions (not only euclidean coordinates), such as a triangulation of the network. Routing. Send messages via multi-hop to given destination. So far, a few standard algorithms implemented Crypto. Platform independent crypto algorithms. Come with pMP – the picoMultiPrecision library, especially designed for embedded system demands.
Motivation Architecture Experimental Results Wiselib Usage Outlook
Performance Read node id. Radio::node_id_tid = Radio::id(os); Send message over radio. Radio::node_id_tdestination; Radio::send(os, destination, len, data); Register timer event. Timer::set_timer <self_type, &self_type::function_name> (os, wait_time, this, userdata);
Codesize: External Architecture • Code size as ROM (.txt) + RAM (.bssand.data) • Translation between OS specific registration mechanisms and C++ member function pointers in Wiselib • Constant overhead per node, node per algorithm
Codesize: Algorithms • Code size as ROM (.txt) + RAM (.bssand.data)
Motivation Architecture Experimental Results Wiselib Usage Outlook
Usage Scenarios • Direct Integration in own Application • Write application for own platform (e.g., collecting sensor data) • Use, for example, routing algorithm from Wiselib • Examples: iSense Integration • https://svn.itm.uni-luebeck.de/wisebed/wiselib/trunk/iapps • Examples: Shawn Integration • https://svn.itm.uni-luebeck.de/wisebed/wiselib/trunk/shawn_apps • Stand-Alone-Applications • Applications with own application_main() • Can be compiled for each platform, run directly • Examples • https://svn.itm.uni-luebeck.de/wisebed/wiselib/trunk/applications
Distributions • “Testing” • Implemented against Wiselib API • Algorithms may only be tested on some target platforms • New concepts that may change • Release Early, Release Often • https://svn.itm.uni-luebeck.de/wisebed/wiselib/trunk/wiselib.testing • “Stable” • Matured concepts and implementations • Tested on all supported platforms • Concepts may not change anymore • https://svn.itm.uni-luebeck.de/wisebed/wiselib/trunk/wiselib.stable
Motivation Architecture Experimental Results Wiselib Usage Outlook
Outlook • External Architecture • Different radio specializations for Contiki, TinyOS, … • More interfaces • Maintenance of existing ones • Algorithms • Add more algorithms: Routing, Localization, … • Add more algorithm categories • Time Synchronization • Target Tracking • …
Thank you! 19 http://www.wiselib.org