Information Technology Reference
In-Depth Information
It can be used, for example, to allow sensors deciding intelligently on what and
when sensor data must be collected and sent, autonomously trigger actions on some
conditions, etc.
During the development in place of real environmental sensing hardware a gen-
eral purpose microprocessor board was used, the PICDEM FS USB[3] demoboard.
This is a board for prototyping systems based on a Microchip PIC-18 microproces-
sor, and has a temperature sensor and a variable potentiometer on board that were
used as stand-ins for real environmental sensors. Other sensors can be attached to
the board through Digital Lines, I 2 C bus, A/D converters, etc. This platform was se-
lected on the grounds of low cost and availability on the local market. Nevertheless,
our software has been also ported to the AVR family of microprocessors.
5
Implementation
A requirement for our solution was the need to be deployable on a wide spectrum of
hardware and software platforms. It ranged from Desktop PCs on central data col-
lecting nodes, to embedded platforms such as Linksys WRT54GL wireless routers.
The intermediate nodes included such platforms as OLPC XO laptops and Intel's
Classmate netbooks, running several avors of Linux and Windows Operating Sys-
tems. At the same time, sensor nodes should be able to interface with external
sensor hardware. Another point of interest was the ability to be run in a simulation
platform, for better analysis and tuning of the Opportunistic Routing component.
5.1 Language selection
It was decided to develop in Lua[1]. Lua is a compact virtual-machine based dynamic
language, with great emphasis on extensibility. It is weakly typed and has a garbage
collector. It is written completely in ANSI-standard C99 and thus the core has
minimal dependencies, and can be run in an extremely wide spectrum of platforms
down to embedded microcontrollers. At the same time, it oers powerful facilities
to programmers, like regular expression matching, hash-based tables, functions as
rst class members, upvalues, and lexical scoping.
Our implementation runs on the core Lua with the only dependency of Lu-
aSocket[12] library. The only platform dependent code needed was for interfacing
the sensor hardware.
The very small number of external dependencies of Lua virtual machine allowed
us to run it inside an experimental ns3 [2] branch intended for running native code.
This branch is at early stages of development, and the high level of isolation of
Lua code allowed us to run production code inside it with only moderate eort.
Being able to run the same code in physical platforms and in the simulator greatly
simplies the development and tuning of networking protocols. At the same time,
the small size per network node of the runtime allows us to simulate reasonable
large networks. Additionally, ns3 allows to connect a real device to a simulated
network. Thus it is possible to deploy a testbed split between a simulation and
Search WWH ::




Custom Search