David Gay Intel Research Berkeley

Slides:



Advertisements
Similar presentations
How to use TinyOS Jason Hill Rob Szewczyk Alec Woo David Culler An event based execution environment for Networked Sensors.
Advertisements

TinyOS 2.0 Network Stack Enhancements Joseph PolastrePhil Levis UC Berkeley UC Berkeley Moteiv Corporation.
Introduction to the BinX Library eDIKT project team Ted Wen Robert Carroll
31242/32549 Advanced Internet Programming Advanced Java Programming
Developing a WSN application using Crossbow devices and software
NesC Prepared for the Multimedia Networks Group University of Virginia.
NesC: A Programming Language for Motes David Gay, Phil Levis, Eric Brewer, Rob von Behren, Nikita Borisov, Mike Chen, David Culler Intel Research, UC Berkeley.
Feb 2007WSN Training: First Steps in nesC Programming1 First Steps in TinyOS and nesC Programming Topics  Timer Application: MyApp  Application directory.
1 Lab 3 Objectives  Case study: “Hello world” program on motes  Write you first program on mote.
Overview: Chapter 7  Sensor node platforms must contend with many issues  Energy consumption  Sensing environment  Networking  Real-time constraints.
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
Chess Review November 21, 2005 Berkeley, CA Edited and presented by Sensor Network Design Akos Ledeczi ISIS, Vanderbilt University.
NesC: 1.1 Bumps and Future Directions David Gay, Intel Research, Berkeley (and the nesC and TinyOS teams)
.NET Mobile Application Development Remote Procedure Call.
Bugs in the Wires or, An Exercise in Language Design David Gay Intel Research Berkeley.
TinyOS 2.1 Jun Yi Partially based on the tutorial at IPSN 2009 By Stephen Dawson-Haggerty, Omprakash Gnawali, David Gay, Philip Levis, Răzvan Musăloiu-E.,
Introduction to Object-oriented Programming CSIS 3701: Advanced Object Oriented Programming.
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.
Simulation of Distributed Application and Protocols using TOSSIM Valliappan Annamalai.
HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 TinyOS & NesC.
Main Issues Three major issues that we are concerned with in sensor networks are – Clustering Routing and Security To be considered against the backdrop.
Remote Procedure Calls CS587x Lecture Department of Computer Science Iowa State University.
Xiong Junjie Node-level debugging based on finite state machine in wireless sensor networks.
Design of an Integrated Robot Simulator for Learning Applications Brendon Wilson April 15th, 1999.
SenSys Attack Tool David Welling Jon Silliman. Project Organization Three step procedure – Reading paper and research sensor networks – Setting up SenSys.
TinyOS Sandeep Gupta. Operating System (OS) What is an OS? Main functions  Process management  Memory management  Resource management Traditional OSs.
Design Patterns Creational Patterns. Abstract the instantiation process Help make the system independent of how its objects are created, composed and.
Ganga/Dirac Data Management meeting October 2003 Gennady Kuznetsov Production Manager Tools and Ganga (New Architecture)
LonWorks Introduction Hwayoung Chae.
TinyOS Sandeep Gupta. TinyOS basics TinyOS is  Single tasking OS  Interrupt driven Written using a Component based language A set of components put.
TinyOS and nesC. Outline ● Wireless sensor networks and TinyOS ● Networked embedded system C (nesC) – Components – Interfaces – Concurrency model – Tool.
Tinyos Introduction to Programming Pritee Parwekar.
Behavioral Interactive and Introspective Objects
Simulation of Distributed Application and Protocols using TOSSIM
Peek into TinyOS Programs
Abstract Data Types and Encapsulation Concepts
CSCI-235 Micro-Computer Applications
Prof. Leonardo Mostarda University of Camerino
SOFTWARE DESIGN AND ARCHITECTURE
CSE 486/586 Distributed Systems Remote Procedure Call
CORBA Alegria Baquero.
Safe TinyOS.
Adapting Applications and Platforms
Database System Concepts and Architecture
CSE 451: Operating Systems Winter 2006 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
PANA Implementation in Open Diameter
Abstract Data Types and Encapsulation Concepts
CORBA Alegria Baquero.
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
CSE 451: Operating Systems Autumn 2003 Lecture 16 RPC
SwE 455 Tutorial.
An Introduction to nesC
Introduction to Computer Science for Majors II
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Electronics II Physics 3620 / 6620
Efficient Memory Safety for TinyOS 2.1
Bits and Bytes Topics Representing information as bits
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Spring 2012 Module 22 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Autumn 2009 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Autumn 2010 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Data Structures and ADTs
CSE 451: Operating Systems Winter 2003 Lecture 16 RPC
WCF Data Services and Silverlight
Last Class: Communication in Distributed Systems
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
SPL – PS1 Introduction to C++.
Chapter 11 Abstraction - The concept of abstraction is fundamental in
Presentation transcript:

David Gay Intel Research Berkeley nesC 1.2 David Gay Intel Research Berkeley nesC is a PL for a new area, n.e.s. nesC is the PL used to implement TinyOS, our OS for n.e.s., and its apps nesC and TinyOS tightly intertwined; designed together to address 1! challenges of this area I’ll start by introducing n.e.s, typical apps and the resulting challenges I will then show how nesC and TinyOS address these challenges

Introduction nesC 1.2 is a major revision to the nesC language Goals “external” types (with Kevin Chang, UCLA) generic components binary components attributes Goals simplify TinyOS programming make it easier to define new abstractions and services

External Types: Why? Current message formats defined as C structures machine-dependent representation different padding different endianness Until recently, not a problem: homogeneous networks, with platform-specific radios mig tool decodes structures for PCs Now: 802.15.4 on telos, micaz, imote2 want interoperability!

Standard Solutions Marshalling/unmarshalling: needs extra RAM protocol stack built by wiring components, so no obvious central place to do marshalling/unmarshalling Unix-style htons, htonl, etc calls programmer-unfriendly only addresses endiannness gcc’s “packed” attribute only addresses padding

External Types nesC 1.2 introduces “external types”, which have a platform-independent representation: OLD NEW struct TOSMsg { nx_struct TOSMsg { uint16_t addr; nx_uint16_t addr; uint8_t group; nx_uint8_t group; … … nx_structs have no padding nx_uint16_t, etc are big-endian on all platforms these types can be used like any C types (some minor restrictions) Very easy to convert TinyOS code to use external types

Generic Components Components with numeric and type arguments, that can be instantiated at compile-time Interfaces can also have type arguments Uses: utility components: filters, adapters, queues, buffers, etc wiring patterns: see OSKI generic module QueueC(typedef t, int n) { provides interface Queue<t>; } implementation { t q[n]; … } configuration App { } implementation { components AppM, new QueueC(TOSMsg, 10) as MyQ; AppM.MsgQ -> MyQ; }

Other Changes (in brief) Attributes (inspired by Java 1.5) programmers can add custom annotations to nesC programs external tools can extract program information uses: wiring checks, network management attributes, etc Binary components compile nesC “app” to .o file with specified entry, exit points uses: build, use, distribute components in binary form encapsulate set of components as C library

Status All features implemented Alpha release at http://sf.net/projects/nescc Being used for TinyOS 2.x development work Will be released with TinyOS 2.0

Backup

Generic Configurations generic configuration SomeAssembly() { provides interface X; } implementation { components new SomeAssemblyM() as SA, new QueueC(TOSMsg, 10) as SomeQ; X = SA.X; SA.Queue -> SomeQ; } Every instantiation of SomeAssembly will create new instances of SomeAssemblyM and IntQueueC

Generic Interfaces Many interfaces similar, except for result, argument types Generic interfaces support this by allowing interfaces to take type parameters Two generic interfaces are connectable iff they have the same type arguments Generic components with type arguments can use generic interfaces to: Provide functionality dependent on that type Express requirements of operations on that type

configuration MyApp { } implementation { components MyCode, new QueueC(int, 10) as MyQ; MyCode.Queue -> MyQ; } interface Queue<t> { command void push(t x); command t pop(); } generic module QueueC (typedef t, int n) { provides interface Queue<t> as Q; } implementation { t q[n]; int p1, p2; command void Q.push(t x) { q[p1++] = x; if (p1 == n) p1 = 0; } …

Another example interface Compare<t> { command bool lessthan(t x1, t x2); } generic module Sort(typedef t) { uses interface Compare<t> as C; } implementation { void f() { t x1, x2; … if (call C.lessthan(x1, x2)) …

Binary Components component ExternalInterface { provides interface StdControl; uses interface Timer; } entry points (of program including ExternalInterface): ExternalInterface.Timer.fired exit points: ExternalInterface.StdControl.{init, start, stop} ExternalInterface.Timer.{start, stop}

Attributes Information on attributes, etc output in XML struct @atmostonce { }; struct @snms { int key; }; … provides interface Timer @atmostonce(); provides interface SNMSAttribute @snms(KEY_PARENT); Information on attributes, etc output in XML Java-based parser for this XML schema Sample “wiring check” demo app