📄 nesc a programming language for deeply networked systems.mht
字号:
From: <由 Microsoft Internet Explorer 5 保存>
Subject: nesC: A Programming Language for Deeply Networked Systems
Date: Wed, 1 Aug 2007 13:42:59 +0800
MIME-Version: 1.0
Content-Type: multipart/related;
type="text/html";
boundary="----=_NextPart_000_0021_01C7D441.DFEB96F0"
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
This is a multi-part message in MIME format.
------=_NextPart_000_0021_01C7D441.DFEB96F0
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://nescc.sourceforge.net/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>nesC: A Programming Language for Deeply Networked =
Systems</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312">
<META content=3D"MSHTML 6.00.2900.2180" name=3DGENERATOR></HEAD>
<BODY vLink=3D#b04000 link=3D#b04000 bgColor=3D#ffffff>
<TABLE cellSpacing=3D2 cellPadding=3D3 width=3D"100%" border=3D0 =
hspace=3D"4">
<TBODY>
<TR bgColor=3D#95b0c6>
<TD width=3D"100%"><IMG=20
src=3D"http://nescc.sourceforge.net/images/nesc3-small.gif" =
align=3Dright=20
border=3D0> <FONT face=3Dtahoma,arial,helvetica><B><BIG><BIG>nesC: =
A=20
Programming Language for Deeply Networked Systems </BIG></BIG></B>
<P>
<P><A href=3D"http://webs.cs.berkeley.edu/">UC Berkeley WEBS =
Project</A>=20
<P>Last updated 14 December 2004 =
</FONT></P></TD></TR></TBODY></TABLE>
<P>
<TABLE cellSpacing=3D2 cellPadding=3D3 width=3D"100%" border=3D0 =
hspace=3D"4">
<TBODY>
<TR bgColor=3D#e0e0e8>
<TD width=3D"100%"><NOBR><B><FONT=20
=
face=3Darial,helvetica>People</FONT></B></NOBR></TD></TR></TBODY></TABLE>=
<P>
<BLOCKQUOTE><A href=3D"http://www.cs.berkeley.edu/~brewer">Eric =
Brewer</A>, UC=20
Berkeley<BR><A href=3D"http://www.cs.berkeley.edu/~culler">David =
Culler</A>, UC=20
Berkeley<BR><A href=3D"http://berkeley.intel-research.net/dgay/">David =
Gay</A>,=20
Intel Research <BR><A href=3D"http://www.cs.berkeley.edu/~pal">Phil =
Levis</A>,=20
UC Berkeley<BR><A href=3D"http://www.cs.berkeley.edu/~jrvb">Rob von =
Behren</A>,=20
UC Berkeley<BR><A href=3D"http://www.eecs.harvard.edu/~mdw">Matt =
Welsh</A>,=20
Harvard University <BR></BLOCKQUOTE>
<P>
<TABLE cellSpacing=3D2 cellPadding=3D3 width=3D"100%" border=3D0 =
hspace=3D"4">
<TBODY>
<TR bgColor=3D#e0e0e8>
<TD width=3D"100%"><NOBR><B><FONT=20
=
face=3Darial,helvetica>Introduction</FONT></B></NOBR></TD></TR></TBODY></=
TABLE>
<P><B>nesC</B> (pronounced "NES-see") is an extension to the C =
programming=20
language designed to embody the structuring concepts and execution model =
of <A=20
href=3D"http://www.tinyos.net/">TinyOS</A>. TinyOS is an event-driven =
operating=20
system designed for sensor network nodes that have very limited =
resources (e.g.,=20
8K bytes of program memory, 512 bytes of RAM).=20
<P>The basic concepts behind nesC are:=20
<UL>
<LI>Separation of construction and composition: programs are built out =
of=20
<I>components</I>, which are assembled ("wired") to form whole =
programs.=20
Components have internal concurrency in the form of <I>tasks</I>. =
Threads of=20
control may pass into a component through its interfaces. These =
threads are=20
rooted either in a task or a hardware interrupt.=20
<LI>Specification of component behaviour in terms of set of =
<I>interfaces</I>.=20
Interfaces may be <I>provided or </I>used by components. The provided=20
interfaces are intended to represent the functionality that the =
component=20
provides to its user, the used interfaces represent the functionality =
the=20
component needs to perform its job.=20
<LI>Interfaces are bidirectional: they specify a set of functions to =
be=20
implemented by the interface's provider (<I>commands</I>) and a set to =
be=20
implemented by the interface's user (<I>events</I>). This allows a =
single=20
interface to represent a complex interaction between components (e.g., =
registration of interest in some event, followed by a callback when =
that event=20
happens). This is critical because all lengthy commands in TinyOS =
(e.g. send=20
packet) are non-blocking; their completion is signaled through an =
event (send=20
done). By specifying interfaces, a component cannot call the =
<TT>send</TT>=20
command unless it provides an implementation of the <TT>sendDone</TT> =
event.=20
<P>Typically commands call downwards, i.e., from application =
components to=20
those closer to the hardware, while events call upwards. Certain =
primitive=20
events are bound to hardware interrupts. </P>
<LI>Components are statically linked to each other via their =
interfaces. This=20
increases runtime efficiency, encourages rubust design, and allows for =
better=20
static analysis of programs.=20
<LI>nesC is designed under the expectation that code will be generated =
by=20
whole-program compilers. This should also allow for better code =
generation and=20
analysis. </LI></UL>
<P>The image below shows the structure (components and their wiring) of =
a simple=20
application, Blink, that blinks an LED once a second:=20
<P>
<CENTER><IMG src=3D"http://nescc.sourceforge.net/blink.gif"> </CENTER>
<P>The sourcecode for Blink is in two parts, the wiring in <A=20
href=3D"http://nescc.sourceforge.net/Blink.nc.txt">Blink</A> and the =
actual=20
application logic (C code) in <A=20
href=3D"http://nescc.sourceforge.net/BlinkM.nc.txt">BlinkM</A>.=20
<P>
<TABLE cellSpacing=3D2 cellPadding=3D3 width=3D"100%" border=3D0 =
hspace=3D"4">
<TBODY>
<TR bgColor=3D#e0e0e8>
<TD width=3D"100%"><NOBR><B><FONT=20
=
face=3Darial,helvetica>Versions</FONT></B></NOBR></TD></TR></TBODY></TABL=
E>
<UL>
<LI>1.0: Initial nesC release.=20
<LI>1.1: Concurrency support: <CODE>async</CODE> declarations,=20
<CODE>atomic</CODE> statements, compile-time data-race detection,=20
<CODE>uniqueCount</CODE>.=20
<LI>1.1.1: Better support for new platforms.=20
<LI>1.1.2: Maintenance release (minor features, bug fixes).=20
<LI>1.1.3: <A=20
href=3D"http://nescc.sourceforge.net/networktypes/index.html">Network =
Types</A>:=20
platform-independent networking support. </LI></UL>
<P>For more details, see the <A=20
href=3D"http://nescc.sourceforge.net/ChangeLog.txt">ChangeLog</A>.=20
<P>
<TABLE cellSpacing=3D2 cellPadding=3D3 width=3D"100%" border=3D0 =
hspace=3D"4">
<TBODY>
<TR bgColor=3D#e0e0e8>
<TD width=3D"100%"><NOBR><B><FONT=20
=
face=3Darial,helvetica>Downloads</FONT></B></NOBR></TD></TR></TBODY></TAB=
LE>
<P>An implementation of nesC (including source code) is available on <A=20
href=3D"http://sourceforge.net/projects/nescc">Sourceforge</A>.=20
<P>
<TABLE cellSpacing=3D2 cellPadding=3D3 width=3D"100%" border=3D0 =
hspace=3D"4">
<TBODY>
<TR bgColor=3D#e0e0e8>
<TD width=3D"100%"><NOBR><B><FONT=20
=
face=3Darial,helvetica>Papers</FONT></B></NOBR></TD></TR></TBODY></TABLE>=
<P>
<UL>
<P>
<LI><B>The nesC Language: A Holistic Approach to Networked Embedded=20
Systems</B>, David Gay, Phil Levis, Rob von Behren, Matt Welsh, Eric =
Brewer,=20
and David Culler. In <EM>Proceedings of Programming Language Design =
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -