Split-phase programming
Handler/task characteristics and separation has consequences for programming model
How to implement a blocking call to another component?
Example: Order another component to send a packet
Blocking function calls are not an option
! Split-phase programming
First phase: Issue the command to another component
Receiving command handler will only receive the command, post it to a task for actual execution and returns immediately
Returning from a command invocation does not mean that the command has been executed!
Second phase: Invoked component notifies invoker by event that command has been executed
Consequences e.g. for buffer handling
TimerComponent start stop fired
Timer init
StdCtrl
setRate fire Clock
Structuring commands/events into interfaces
Many commands/events can add up
nesC solution: Structure corresponding commands/events into interface types
Example: Structure timer into three interfaces
StdCtrl
Timer
Clock
Build configurations by wiring together corresponding
interfaces
TimerComponent Timer StdCtrl
Clock HWClock Clock
Timer StdCtrl
Building components out of simpler ones
Wire together components to
form more complex components out of simpler ones
New interfaces for the complex
component
Defining modules and components in nesC
Wiring components to form a configuration
StdCtrl;
A TinyOS Demonstration (1/2)
Some supported methods (Windows & Linux)
Manually (Windows: cygwin & RPM, Linux: RPM)
Virtual machine image (VMWare, VirtualBox)
Example: starting the Xubuntos 2.1 VMWare image
Plug in Sensor node first!
Start XubunTOS image
Login: user = xubuntos, password = tinyos
y $ z! setxkbmap de
VMPlayerVMRemovable DevicesUSB Devices:
Future Technology Devices USB device (Port 1)
A TinyOS Demonstration (2/2)
“Hello World”
Call motelist
Call cd /opt/tinyos-2.1-0/apps/Blink
Call make telosb install
Look at BlinkAppC.nc and BlinkC.nc
“The” resource: www.tinyos.net !!!
Demo:
Start Xubuntos
Plug in USB device
Zusammenfassung und Literatur
Beispielanwendungen
Sensor-Hardware und Netzarchitektur
Herausforderungen und Methoden
MAC-Layer-Fallstudie IEEE 802.15.4
Energieeffiziente MAC-Layer
WSN-Programmierung
Zusammenfassung
Herausforderungen
Energieeffizienz
Geringe Rechen- und Speicherkapazität
Geringe Kommunikationsbandbreite
Erfordert neue Ansätze auf den einzelnen Protokollschichten: z.B.
energieeffiziente MAC-Layer
Aufweichen von striktem Protokoll-Layering: „Cross-Layer- Optimierungen“
Geräte sind in der Regel keiner Person direkt zugeordnet
Neue Sichtweise auf Kommunikation
ID-Zentrisch versus Datenzentrisch
Maschine-zu-Maschine-Kommunikation
Literatur
Holger Karl and Andreas Willig, „Protocols and Architectures for Wireless Sensor Networks”, John Wiley & Sons, 2005.
Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David E.
Culler and Kristofer S. J. Pister, “System Architecture Directions for Networked Sensors”, Proceedings of the 9th International ACM Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2000.
Philip Buonadonna, Jason Hill and David Culler, “Active Message Communication for Tiny Networked Sensors”, Proceedings of the 20th Annual Joint Conference of the IEEE Computer and
Communications Societies (INFOCOM), 2001.
David Gay, Philip Levis, Robert von Behren, Matt Welsh, Eric
Brewer and David Culler, “The nesC language: A holistic approach to networked embedded systems”, Proceedings of the ACM
Conference on Programming Language Design and Implementation (PLDI), 2003.