NesC Programming Language - PowerPoint PPT Presentation

Loading...

PPT – NesC Programming Language PowerPoint presentation | free to download - id: de784-MzBmO



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

NesC Programming Language

Description:

Auto Wiring initialization. C' and P' implementation. The as' keyword and ... The component list lists the components thar are used to build this configuration ... – PowerPoint PPT presentation

Number of Views:51
Avg rating:3.0/5.0
Slides: 25
Provided by: Sonu9
Learn more at: http://www.cs.gsu.edu
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: NesC Programming Language


1
NesC Programming Language

  • Himali Saxena

2
Topics
  • Configurations and Wiring
  • Configuration implementation
  • Basic Rules for declaration/definition
  • Auto Wiring initialization
  • C and P implementation
  • The as keyword and other namespace tricks
  • Pass Through Wiring
  • Combine Functions
  • Parameterized Wiring

3
Configurations and Wiring
  • Configuration A Component whose implementation
    is component wiring
  • Compose module into larger abstractions
  • Wiring Connecting two components such that one
    module to be able to call another

4
Configuration Implementation
  • implementation component-list ,
    connection-list
  • The componentlist lists the components thar are
    used to build this configuration
  • The connection-list specifies how these
    components are wired to each other and to the
    configurations specification

5
An Example
6
Basic Rules for Declaring
  • Use component keyword to tell the names of the
    component it is wiring
  • Any number of components names can follow
    components, order doesnt matter
  • Can have multiple component statements
  • Three operators -- gt, lt -- and
  • Direct wiring ( -- gt or lt --) always goes to a
    user to a provider.
  • operator exports interfaces

7
Example
8
Contd…
9
An Example ( operator)
10
Auto Wiring Initialization
11
C and P Implementation
  • C implementation Externally usable abstraction
  • P implementation an internal implementation

12
(No Transcript)
13
The as Keyword and other namespace tricks
  • The as keyword allows to rename an interface in a
    signature
  • The as keyword can also be used within
    configurations

14
(No Transcript)
15
Pass Through Wiring
  • Pass through wiring is when a configuration wires
    two interfaces in its signature together. It must
    wire a uses to a provides, and it does so with
    operator.

16
Multiple Wiring, Fan-in, and Fan-out
17
Combine Function
  • NesC provides mechanism of combine functions to
    specify return value
  • A fan-ot always involves calling N functions with
    identical signatures, the callers return value
    is the result of applying the combine function to
    the return values of all of the callees
  • When NesC compiles application, it autogenerates
    a fan-out function which applies the combine
    function

18
An Example
19
Parameterized Wiring
20
Contd…
21
Another way of defining parameter
22
Defaults
  • A default handler is an implementation of a
    function thats used if no implementation is
    wired in. If a component wires to the interface,
    then the implementation is used. Otherwise, the
    (or signal) goes to the default handler.

23
(No Transcript)
24
References
  • http//www.tinyos.net/tinyos-2.x/doc/pdf/tinyos-pr
    ogramming.pdf
  • David Gay , Philip Levis , Robert von Behren ,
    Matt Welsh , Eric Brewer , David Culler, The nesC
    language A holistic approach to networked
    embedded systems, Proceedings of the ACM SIGPLAN
    2003 conference on Programming language design
    and implementation, June 09-11, 2003, San Diego,
    California, USA
  • David Gay, Philip Levis, David Culler, Eric
    Brewer, nesC 1.1 Language Reference Manual May
    2003
About PowerShow.com