overview a wireless sensor network (wsn) is a wireless network consisting of spatially distributed...

Post on 05-Jan-2016

214 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

What it is?

Applications

Applications

Applications11 11

Application

50 nodes on 4th floor5 level ad hoc net30 sec sampling250K samples to database over 6 weeks

TinyOS is a free and open source component-based operating system and platform targeting wireless sensor networks (WSNs).

TinyOS is an embedded operating system written in the nesC programming language as a set of cooperating tasks and processes. It is intended to be incorporated into smartdust.

TinyOS started as a collaboration between the University of California, Berkeley in co-operation with Intel Research and Crossbow Technology, and has since grown to be an international consortium, the TinyOS Alliance.

TinyOS-2.xA nesC application consists of one or more components assembled, or wired, to form an application executable.

A component provides and uses interfaces.There are two types of components in nesC: modules and configurations.

Modules provide the implementations of one or more interfaces.

Configurations are used to assemble other components together, connecting interfaces used by components to interfaces provided by others.

TinyOS-2.x BlinkAppC.nc

configuration BlinkAppC { configuration BlinkAppC { }} implementation { implementation { components MainC, BlinkC, LedsC;components MainC, BlinkC, LedsC; components new TimerMilliC() as Timer0;components new TimerMilliC() as Timer0; components new TimerMilliC() as Timer1;components new TimerMilliC() as Timer1; components new TimerMilliC() as Timer2;components new TimerMilliC() as Timer2; BlinkC -> MainC.Boot; BlinkC -> MainC.Boot; BlinkC.Timer0 -> Timer0;BlinkC.Timer0 -> Timer0; BlinkC.Timer1 -> Timer1;BlinkC.Timer1 -> Timer1; BlinkC.Timer2 -> Timer2; BlinkC.Timer2 -> Timer2; BlinkC.Leds -> LedsC; BlinkC.Leds -> LedsC; } }

TinyOS-2.xBlinkC.nc:

module BlinkC { uses interface Timer<TMilli> as Timer0; uses interface Timer<TMilli> as Timer1; uses interface Timer<TMilli> as Timer2; uses interface Leds; uses interface Boot; } implementation { event void Boot.booted() { call Timer0.startPeriodic( 250 ); call Timer1.startPeriodic( 500 ); call Timer2.startPeriodic( 1000 ); } event void Timer0.fired() { call Leds.led0Toggle(); } event void Timer1.fired() { call Leds.led1Toggle(); } event void Timer2.fired() { call Leds.led2Toggle(); } }

TinyOS-2.x

Case StudyIntelligent Buildings

Case StudyShop Floor

top related