Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
NesC
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{lowercase|nesC}} {{about|the programming language|the safety code|National Electrical Safety Code}} '''nesC''' (pronounced "NES-see") is a [[Component-oriented_programming|component-based]], [[Event-driven programming|event-driven]] [[programming language]] used to build applications for the [[TinyOS]] platform. TinyOS is an [[operating environment]] designed to run on embedded devices used in distributed [[wireless sensor network]]s. nesC is built as an extension to the [[C (programming language)|C programming language]] with components "wired" together to run applications on TinyOS. The name ''nesC'' is an abbreviation of "network embedded systems C".<ref>{{cite journal |last1=Gay |first1=David |last2=Levis |first2=Phil |last3=von Behren |first3=Rob |last4=Welsh |first4=Matt |last5=Brewer |first5=Eric |last6=Culler |first6=David |year=2003 |title=The nesC Language: A Holistic Approach to Networked Embedded Systems |journal=SIGPLAN Notices |publisher=[[Association for Computing Machinery]] |volume=38 |issue=5 |pages=1β11 |doi=10.1145/780822.781133 |issn=0362-1340}}</ref> ==Components and interfaces== nesC programs are built out of components, which are assembled ("wired") to form whole programs. Components have internal concurrency in the form of tasks. Threads of control may pass into a component through its interfaces. These threads are rooted either in a task or a hardware interrupt. Interfaces may be provided or used by components. The provided interfaces are intended to represent the functionality that the component provides to its user, the used interfaces represent the functionality the component needs to perform its job. In nesC, interfaces are bidirectional: They specify a set of functions to be implemented by the interface's provider (commands) and a set to be implemented by the interface's user (events). This allows a single interface to represent a complex interaction between components (e.g., registration of interest in some event, followed by a callback when that event happens). This is critical because all lengthy commands in TinyOS (e.g. send packet) are non-blocking; their completion is signaled through an event (send done). By specifying interfaces, a component cannot call the send command unless it provides an implementation of the sendDone event. Typically commands call downwards, i.e., from application components to those closer to the hardware, while events call upwards. Certain primitive events are bound to hardware interrupts. Components are statically linked to each other via their interfaces. This increases runtime efficiency, encourages robust design, and allows for better static analysis of programs. ==References== {{Reflist}} ==External links== * {{Official website|nescc.sourceforge.net}} {{Wireless-stub}} {{Compu-lang-stub}} {{CProLang}} {{Wireless Sensor Network}} {{Embedded systems}} [[Category:Embedded systems]] [[Category:Wireless sensor network]] [[Category:C programming language family]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:About
(
edit
)
Template:Asbox
(
edit
)
Template:CProLang
(
edit
)
Template:Cite journal
(
edit
)
Template:Compu-lang-stub
(
edit
)
Template:Embedded systems
(
edit
)
Template:Lowercase
(
edit
)
Template:Official website
(
edit
)
Template:Prog-lang-stub
(
edit
)
Template:R shell
(
edit
)
Template:Reflist
(
edit
)
Template:Wireless-stub
(
edit
)
Template:Wireless Sensor Network
(
edit
)