21.08.2013 Views

A State-Based Programming Model for Wireless Sensor Networks

A State-Based Programming Model for Wireless Sensor Networks

A State-Based Programming Model for Wireless Sensor Networks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3 <strong>Programming</strong> and Runtime<br />

Environments<br />

Developing a sensor network application typically requires to program individual<br />

sensor nodes. Today, programming of individual sensor nodes is mostly<br />

per<strong>for</strong>med by programmers directly. Even though research has made much<br />

progress in distributed middleware and high-level configuration languages <strong>for</strong><br />

sensor nodes, typically most of the application code still has to be specified by<br />

the hand of a programmer.<br />

To support application programming, several programming frameworks exist<br />

<strong>for</strong> sensor nodes. <strong>Programming</strong> frameworks provide a standard structure<br />

to develop application programs, typically <strong>for</strong> a specific application domain,<br />

<strong>for</strong> example, Graphical User Interface programming, or, in our case, sensornode<br />

programming. <strong>Programming</strong> frameworks <strong>for</strong> sensor nodes consist of a<br />

runtime environment with reusable code and software components, programming<br />

languages, and software tools to create and debug executable programs<br />

(see Fig. 3.1). The conceptual foundation of a programming framework is a programming<br />

model. The programming model defines the conceptual elements in<br />

which programmers think and structure their programs. These elements are<br />

operating-system abstractions (such as threads, processes, dynamic memory,<br />

etc.) and language abstractions (such as functions, variables, arguments and<br />

return parameters of procedural programming languages). Other elements are<br />

abstractions <strong>for</strong> frequently used (data) objects (such as files, network connections,<br />

tracking targets, etc.), as well as convenient operations and algorithms on<br />

those objects.<br />

Programs specified based on high-level programming models, however, do<br />

not directly execute on the sensor-nodes hardware. Rather, they require a software<br />

layer to provide them with a runtime environment. That runtime environment<br />

bridges the gap between the high-level programming model and the lowlevel<br />

execution model of the processor. It typically consists of middleware components,<br />

code libraries, OS system calls, and compiler-generated code, which<br />

together provide the implementations of the model’s abstractions. Naturally, a<br />

programming model with more and more expressive abstractions will require<br />

more support from the runtime environment.<br />

The explicit goal of traditional computing systems is to accommodate a wide variety<br />

of applications from different domains. There<strong>for</strong>e, they typically provide a<br />

“thick” and powerful system software that supports rich programming models<br />

and many abstractions. From this variety, application designers can (and must)<br />

choose a model that suits their applications needs best. <strong>Sensor</strong>-node plat<strong>for</strong>ms,<br />

however, are often subjected to severe resource constraints. There<strong>for</strong>e they can<br />

af<strong>for</strong>d only a thin system software layer and can thus offer only a limited programming<br />

model. The designers of programming frameworks <strong>for</strong> sensor-node

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!