What is SNAP? ------------- SNAP, Sensor Network Application Plugin, consists of a collection of C++ classes that wrap around TinyOS-0.6.1 system components and a macro PLUGIN to instantiate the application. By using the C++ classes, it simplifies both the development and debugging process for sensor network applications. By using the macro PLUGIN, it provides the SNAP-based applications the forward compatibility to become plugins in the future on supporting platforms without any code modification. For details, please visit http://www.cs.ucr.edu/~weesan/snap/snap.pdf Installation steps: ------------------- 1. Download TinyOS-0.6.1 from: http://www.tinyos.net/dist-0.6/tinyos-export-head-2002-04-16.tgz 2. Download the SNAP patch from: http://www.cs.ucr.edu/~weesan/snap/snap_patch-0.0.1 3. Unpack tinyos-export-head-2002-04-16.tgz. % gzip -cd tinyos-export-head-2002-04-16.tgz | tar xvf - 4. Apply the patch. % patch -p0 < snap_patch-0.0.1 5. Make soft link pc++ from pc and mica++ from mica under nest/tos/platform. % cd nest/tos/platform % ln -s pc pc++ % ln -s mica mica++ 6. Have to change BASEDIR in nest/apps/Makeinclude to the root of the source tree. % cd ../../apps/ % vi Makeinclude 7. Go to the applications and start running make. For example: % cd blink % make mica++ 8. Steps 1-6 are only needed once. How to port or add more applications using SNAP: ------------------------------------------------ 1. Added the object name into CXX_OBJS in Makefile for the component, for example: CXX_OBJS = sense.o Then create a C++ file called sense.cc. When done, make 'target'. For example: % make mica++ Notes: ------ 1. When making libraries under nest/tos/system, it is very important to go to that directory and do 'make clean' before trying to build executables from one platform to another. For example, after doing 'make mica++' from some applications, before doing 'make pc++'. The reason being that after doing 'make mica++', the object files left under nest/tos/system are object files for MICA platform. If you do 'make pc++' without first cleaning up those MICA object file, a wrong system library will be built from those leftover. 2. Due to time constrain, currently, only 4 applications and pertinent system components are done. More will be done in the future, hopefully :) Enjoy! Should you have any questions or comments, please do not hestitate to send me email @ weesan@cs.ucr.edu. Thanks, WeeSan Lee 12/8/2004