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.

viii Contents<br />

8.2.4 Program <strong>State</strong> Machines (PSM), SpecCharts . . . . . . . . . 144<br />

8.2.5 Communicating FSMs: CRSM and CFSM . . . . . . . . . . 145<br />

8.2.6 Esterel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145<br />

8.2.7 Functions driven by state machines (Fun<strong>State</strong>) . . . . . . . 146<br />

8.3 <strong>Sensor</strong>-Node <strong>Programming</strong> Frameworks . . . . . . . . . . . . . . 146<br />

8.3.1 TinyOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146<br />

8.3.2 Contiki . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148<br />

8.3.3 Protothreads . . . . . . . . . . . . . . . . . . . . . . . . . . . 148<br />

8.3.4 SenOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149<br />

9 Conclusions and Future Work 151<br />

9.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151<br />

9.2 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151<br />

9.2.1 Problem Analysis: Shortcomings of Events . . . . . . . . . 152<br />

9.2.2 Solution Approach: <strong>State</strong>-based <strong>Programming</strong> . . . . . . . 152<br />

9.2.3 Prototypical Implementation . . . . . . . . . . . . . . . . . 153<br />

9.2.4 Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153<br />

9.3 Limitations and Future Work . . . . . . . . . . . . . . . . . . . . . 153<br />

9.3.1 Language and Program Representation . . . . . . . . . . . 154<br />

9.3.2 Real-Time Aspects of OSM . . . . . . . . . . . . . . . . . . 155<br />

9.3.3 Memory Issues . . . . . . . . . . . . . . . . . . . . . . . . . 155<br />

9.4 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . 156<br />

A OSM Code Generation 157<br />

A.1 OSM Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157<br />

A.2 Variable Mapping (C include file) . . . . . . . . . . . . . . . . . . . 159<br />

A.3 Control Flow Mapping–Stage One (Esterel) . . . . . . . . . . . . . 161<br />

A.4 Control Flow Mapping–Stage Two (C) . . . . . . . . . . . . . . . . 164<br />

A.4.1 Output of the Esterel Compiler . . . . . . . . . . . . . . . . 164<br />

A.4.2 Esterel-Compiler Output Optimized <strong>for</strong> Memory Efficiency 169<br />

A.5 Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173<br />

A.5.1 Example Compilation Run . . . . . . . . . . . . . . . . . . 173<br />

A.5.2 Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173<br />

B Implementations of the EnviroTrack Group Management 175<br />

B.1 NesC Implementation . . . . . . . . . . . . . . . . . . . . . . . . . 175<br />

B.2 OSM Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 180<br />

Bibliography 181

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

Saved successfully!

Ooh no, something went wrong!