Wednesday, August 31, 2011

NesC


NesC is an extension to C, which is based on the embodiment of the TinyOS structured concept and execution model and design. TinyOS is for sensor network node designed an event-driven operating system, sensor network node has a very limited resources ( for example, a program memory. 8K bytes, 512 bytes of random access memory). TinyOS use nesC to write.
Brief introduction
1: the structure and content of the separation of program components, which are assembled together (" wiring" ) constitute a complete program. Component definition of two kinds of field, for a description of them (including their interface request name ), another for their complements. Internal operation form of collaborative assembly. Control can be threaded through its interface into a component. These threads are produced in a job or a hardware interrupt.
2 according to the interface settings illustrate component function. Interface can be provided by the components or use. It is to provide the interface for users, by the use of the interface performance users completed its operation required function.
The 3 interface is bidirectional: they described a group interface provider ( instruction ) of the function and a group of the user interface ( events ) to achieve the function of. This allows a single interface to complex interactions between components ( for example,. When a certain event in a callback occurred before, some of the events of interest registration ). This is dangerous, because the TinyOS all of the command ( for example. Send packets ) is not interrupted; they completed by an event ( sent ) mark. Through the narration interface, a component can call send instruction unless it provides the realization of sendDone events. Usually instructions down the call, for example, from the application components to those closer to the hardware call, and the event to invoke. Specific primitive events and hardware interrupt is associated ( this correlation is determined by the system, so in this reference manual without further description).
5 component via the interface static linked to each other. This increases the operation efficiency, support rubust design, but also to allow better program static analysis.
5 nesC based on the integrity of the program code generated by the compiler needs to design. This takes into account the good code reuse and analysis. One aspect of this example is nesC compile - time competition data monitor.
6 nesC collaboration model based on once you begin until finishing the homework, and an interrupt far source can interrupt operation. NesC compiler markers by the interrupt source induced potential competition data.

No comments:

Post a Comment