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
0
votes
1 answer

use serialforwarder data in another program

how can i build the serialforwarder or use it to forward the received data to another program to make some process? how to parse the data and use it as input data to another program such as Matlab or c# or java application. which protocol used to…
Hana90
  • 943
  • 5
  • 17
  • 37
0
votes
2 answers

dynamic array in NesC with Tinyos 1,x

i want to define dynamic array which i don't want to give it constant length ex: uint16_t array1[10]. need to dynamically grow when we insert new item. i want it suitable with TinyOs 1.x
Hana90
  • 943
  • 5
  • 17
  • 37
0
votes
1 answer

File handling in tinyos or tossim

I need to read data from a text file in a tinyos file (nesc file). I searched lot on Internet but couldn't find a way. Is there any way?
unknown_boundaries
  • 1,482
  • 3
  • 25
  • 47
0
votes
1 answer

how to read virtual serial port of MIB520

i need to read from my Pc the serial port that connected with MIB520 usb board ? if i know the sequence of the data received byte by byte then can i use C# or any tool to read this port ?? i have iris and MicAz motes that read gps packet then they…
Hana90
  • 943
  • 5
  • 17
  • 37
0
votes
1 answer

Module to wrap generic Timer

I am trying to write a module to wrap a generic Timer, but I would like to use this module to be able to wrap timers with arbitrary precision, without writing duplicated code. I wrote the module like that, but it complains that precision_tag is…
LtWorf
  • 7,286
  • 6
  • 31
  • 45
0
votes
1 answer

TinyOS , Could not receive the packet after restarting the mote

pseudocode; 1-boot (red led) broadcast the packet,after send done(green light) receive the packet, decode the packet and set led accordingly as (set blue) broadcast the packet after coding, send done (set led green) receive packet, decode it and…
Swetha.P
  • 81
  • 2
  • 8
0
votes
1 answer

Store an integer in an array where the elements represent 1 byte of the value

I'm using AES to encrypt some data that I'm going to send in a packet. I need to store an integer in an array of 8 bit elements. To make this clear, my array is declared as: uint8_t in[16] =…
user1754045
  • 175
  • 1
  • 6
  • 15
0
votes
1 answer

syntax of struct in C or nesC

I have some nesC code, and there is some sturct definitions like the example below: typedef nx_struct serial_header { nx_am_addr_t dest; nx_am_addr_t src; nx_uint8_t length; nx_am_group_t group; nx_am_id_t type; } serial_header_t; I cant…
Dumbo
  • 13,555
  • 54
  • 184
  • 288
0
votes
3 answers

Convert Array to String Nesc

I want to convert an array of uint8_t to a uint32_t in NesC. Does anyone know how I can do this?
Nouha
  • 33
  • 13
-1
votes
2 answers

Installing TinyOS 1.x and TOSSIM in Ubuntu

I've been into a project for evaluating the performance of a wireless sensor network. I need to work with TinyOS 1.x and nesC. Also I need to install TOSSIM simulator. I'm using Ubuntu 10.04. Is there a way to get it?
Arjun Vasudevan
  • 792
  • 4
  • 13
  • 33
-1
votes
1 answer

What's the exact meaning of uint8_t in TinyOS?

everyone! I'm trying to become familiar with TinyOS. I'd like to know the difference between uint8_t and uint16_t. Thank you in advance :-)
rick87
  • 51
  • 9
-1
votes
1 answer

TinyOS interrupts handlling

Please give me an advice for this: I want to get the time when a signal is sent from a mote(I was thinking to generate a interruption when the SFD pin gets from 1 to 0) I didn't find a solution for that, but I found this component: Component:…
Gigg
  • 1,019
  • 3
  • 11
  • 20
-1
votes
1 answer

Xacml in tinyOS

I have to implement an rbac in mica motes. I've read that Xacml helps in implementation of rbac. But I searched tutorials and google and I'm not able to find anything relevant.Can some one please explain how it should be done or any lead to…
1 2 3 4
5