REALTALK

636 views

Published on

REALTALK A Programming Language for Wireless Embedded Sensor Networks. Alexandre Bergel. ESUG 2006, Prague

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
636
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

REALTALK

  1. 1. REALTALK A Programming Language for Wireless Embedded Sensor Network Alexandre Bergel Siobhán Clarke Distributed Systems Group Trinity College Dublin
  2. 2. Alexandre Bergel Programming wireless sensor devices is difficult • Embedded sensor systems are difficult to program. • Power consumption, memory management, hardware abstraction: – component maintenance: the C programming language prevents software component from being easily maintained. – sensor asynchronism: sampling is achieved by emitting and receiving events. 2
  3. 3. Alexandre Bergel Sensor sampling creates disruption in the app 3 CPU Sensor Request for a sampling answer measurement Optimizing resource is critical!
  4. 4. Alexandre Bergel Sensor sampling creates disruption in the app 4 CPU Sensor Request for a sampling answer measurement Data passing is critical!
  5. 5. Alexandre Bergel Realtalk: An Object-based language Goal: making embedded programming easier and providing advanced hardware abstraction. Creation of a counter application: RTObject subclass: #Counter variableNames: ‘leds timer value’. Counter compile: ‘start value := 0. timer invoke: #triggeredMethod every: 500.’ Counter compile: ‘triggeredMethod value := value + 1. leds display: value.’ 5
  6. 6. Alexandre Bergel Object composition and hybrid type system Linking the counter to the leds and a timer: RTObject subclass: #Counter variableNames: ‘leds timer value’. Counter composeWith: { #leds -> Leds. #timer -> Timer } Realtalk supports an hybrid type system. 6
  7. 7. Alexandre Bergel Class specialization Let’s emit a sound at each increment: Counter subclass: #SoundCounter variableNames: ‘sounder’ aliases: { #triggeredMethod -> #incAndDisplay}. SoundCounter compile: ‘triggeredMethod self incAndDisplay. leds isRedOn ifTrue: [sounder start] ifFalse: [sounder stop].’ 7
  8. 8. Alexandre Bergel Example of Controlled Disruption Reading two sensors and emitting their sampling: AnyObject compile: ‘readingTwoSensors | value1 value2 | leds display: 1. value1 := lightSensor read. leds display: 2. value2 := soundSensor read. leds display: 3. radio emit: (value1 + value2).’ 8
  9. 9. Alexandre Bergel Method is cut down into pieces... 9 Reading two sensors and emitting their sampling: AnyObject compile: ‘readingTwoSensors | value1 value2 | leds display: 1. value1 := lightSensor read. leds display: 2. value2 := soundSensor read. leds display: 3. radio emit: (value1 + value2).’
  10. 10. Alexandre Bergel ... and those pieces are inserted in a pool 10 ...
  11. 11. Alexandre Bergel Implementation based on TinyOS/NesC 11 Mote/Mica/... 4k RAM devices TinyOS NesC Realtalk
  12. 12. Alexandre Bergel Conclusion • Realtalk is a scripting language dedicated to small sensor device with high limited resources. • It provides advanced features regarding: – component interactions – component specialization – sensor programming • On going work focuses on large software construction. 12

×