Questions tagged [nesc]

nesC (pronounced "NES-see") is an extension to the C programming language designed to embody the structuring concepts and execution model of TinyOS.

nesC (pronounced "NES-see") is an extension to the C programming language designed to embody the structuring concepts and execution model of TinyOS. TinyOS is an event-driven operating system designed for sensor network nodes that have very limited resources (e.g., 8K bytes of program memory, 512 bytes of RAM).

The basic concepts behind nesC are:

  • Separation of construction and composition: 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.

  • Specification of component behaviour in terms of set of interfaces. 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.

  • 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 rubust design, and allows for better static analysis of programs.

  • nesC is designed under the expectation that code will be generated by whole-program compilers. This should also allow for better code generation and analysis.

Taken from: http://nescc.sourceforge.net/

73 questions
1
vote
0 answers

Buffer management for contiki

I am working with TelosB mote and we are trying to send two different packets (strings) from one mote and trying to receive and print both strings on other mote but on the receiver end it's only receiving one string. I am unable to understand why…
Eye Yaz
  • 11
  • 1
1
vote
1 answer

nesC files using functions of C file

I help some help to understand while my source don't compile, the main errors report are : SerialC.nc:43: syntax error before `&' SerialC.nc:43: warning: return-type defaults to `int' SerialC.nc:43: conflicting types for `startList' In my…
user1687504
1
vote
1 answer

How to split up an array to specific size

I am about to implement some algorithm in telosb motes. What I need to do is, take a file and split it up in smaller objects and then splitting up the object to even smaller object called pages, like described in the figure below. After doing that,…
RamHS
  • 750
  • 6
  • 24
1
vote
1 answer

NesC / GMP Undefined Symbol

I am trying to make a NesC program to use with TOSSIM (TinyOS simulator) including the gmp library Here is a sample of my code event void Boot.booted() { //dbg("MAPC", "Booted\n"); //int g = 2; …
Crownless
  • 123
  • 1
  • 6
1
vote
1 answer

return type for event in TinyOS

I'm implementing a module using nesC for TinyOS. My modules uses interface Timer<> so I have to implement the event fired of the interface Timer, it is possible to return a value inside this implementation or an event must be always void?
Domenico
  • 89
  • 2
  • 9
1
vote
2 answers

Start TinyOS programming and simulation in Windows

I want to start programming nesC for wireless sensor network on TinyOS in Windows environment. So far, I installed Cygwin terminal, and don't know how to install those packages. To install the package, the command is like " rpm ***" but not sun…
Ji Li
  • 21
  • 1
1
vote
1 answer

How to add more fields in Iris RSSiDemo packet

Can any one tell me how to increase packet size using IRIS mote. I am pasting my Header file i hav added nodeid and counter but it is not appearing in the packet..Any help will be great full RssiDemoMessages.h
Jijeesh
  • 29
  • 4
1
vote
2 answers

Get children response in TinyOS

I'm totally lost using TinyOS and I think I need some help over here. I have a node that send a message to all nodes that listen to him, so, from time to time this node send a message to all of his "children" event void Timer.fired() { call…
briba
  • 2,857
  • 2
  • 31
  • 59
1
vote
2 answers

GPS module take time

how much GPS module take time to get the gps infromation, if i use 420cc sensor board attached to this gps module uBlox LEA-4A . i use Iris mote.
Hana90
  • 943
  • 5
  • 17
  • 37
1
vote
0 answers

how to parse customer message?

i use customer message and send it broadcast over radio channel, i use example 6 (CounterSend ) from this link . when i build this project as micAz on mote 1, after this i use Xsniffer (TOSBase) on the mote that i will use it on the serial usb board…
Hana90
  • 943
  • 5
  • 17
  • 37
1
vote
1 answer

interface with events and commands - cannot signal event

I found it difficult to signal an event in nesC. Can anyone help? (EDIT: I omitted MainC components in code below). I have defined a simple interface: interface MyInterface { command uint8_t action(); event void actionDone(); } It has one…
Grzes
  • 971
  • 1
  • 13
  • 28
1
vote
1 answer

TinyOS/nesC Receive.receive event is signalled periodically but processed only once

I'm currently working with implementation of AODV protocol for TinyOS and I'm seeing weird behaviour when network layer is signalling application about received message. Below are relevant pieces of application and AODV library code + some debug…
IvanR
  • 533
  • 4
  • 23
1
vote
1 answer

C function pointers error storage class specified for parameter `type name'

I currently have a piece of code that I am working on using function pointers as callbacks. I am having trouble with an error from gcc stating "storage class specified for parameter `type name'" The relevant portion of code is: error_t…
Newlyn Erratt
  • 97
  • 2
  • 7
0
votes
0 answers

tinyos implementation of routing table for multiple nodes

I am writing a module implementation in nesC for a network of 7 motes identified by the means of ID. Each mote is assumed to have a routing table with a specific structure, defined as: // Define routing table structure typedef nx_struct…
0
votes
0 answers

Segmentation Fault error in nesC for Flooding packet acknowledgement using TinyOS

For my assignment, I am meant to implement Flooding on a network topology. The following is the code for which the when the packet has reached its final destination and I want to return an acknowledgement. The segmentation fault seems to happen at…
zepher4
  • 1
  • 1