Escolar Documentos
Profissional Documentos
Cultura Documentos
What is it?
component oriented OS
developed in nesC
mainly for research
Whats this
component oriented
business all
about???
Component orientation
2. send
3. blink
1. sense
What does it look like?
What does it support?
platforms: telos, mica, shimmer, zolertia,
Cortex-M3 (SAM3S and SAM3U)
protocols
6LoWPAN: BLIP
RPL: TinyRPL
CoAP
Collection: CTP
Dissemination: Drip
OTA reprogramming: Deluge
security: TinySec, MiniSec, TinyECC, etc
Lets dive in...
nesC?
derivative of C
additional keywords
command, event, task, signal, post
configuration, module, interface, uses, provides
and a few others
TinyOS
nesC app.c gcc
app
elf
Execution model
C functions - nothing new here
commands and events for intercomponent
communication
asynchronous events - caused by HW
interrupts
tasks - delayed execution
Execution model
LedsC MainC TimerC
HW interrupts
Call cascade
commands and events => function calls
A B
call_1 call_3
call_2
signal_2
signal_1 signal_1
signal_2
call_2
call_3 call_1
Call stack
Tasks and the scheduler
tasks break the call cascade
WAIT (idle)
in configurations
wiring providers to users
Configuration Module
Programming model
interfaces for component communication
providers
implement commands
users
call commands
multiple endpoints?
parameterised interfaces
translate to switch statements
Some actual examples...
Basic components
MainC: point of entry into applications
provides Boot.booted
LedsC: blinky blink
provides Leds.ledX[On|Off|Toggle] and Leds.set(val)
TimerC: tic-toc
provides Timer.startPeriodic, Timer.startOneShot
event: Timer.fired
Basic components - example
MainC
TimerC
LedsC
Active Messaging comms stack
single buffer network stack
address based
...or anycast
endpoints (ports) => parameterised interfaces
Active Messaging comms stack
Application
address-based
AMSenderC AMReceiverC single buffer
generic (paremeter = endpoint id)
Application
AMSenderC AMReceiverC
ActiveMessageC
Active Messaging comms stack
Example receiving data
single buffer must be freed ASAP
delay lengthy processing with
Queues and Pools and tasks
Application
AMSenderC AMReceiverC
ActiveMessageC
Active Messaging comms stack
Application
anycast comms (no address required)
buffer management provided
address-based
AMSenderC AMReceiverC single buffer
generic (paremeter = endpoint id)