On Jun 18, 2010, at 7:09 PM, Pedro Nunes wrote:

> Hello, Eric.
> 
> First of all, sorry for the misunderstanding -- I forgot to mention I was 
> working with TOSSIM.
> 
> I've been trying to find the piece of code responsible for instantiating the 
> several motes used within a simulation. I was convinced that although we had 
> N motes running on the simulator, they would all share the same modules and 
> configurations and therefore the same data fields (which would be messy, I 
> know). On the other hand, I knew from the start that that wasn't the correct 
> behavior of WSN's and it was hard for me to believe that the simulator would 
> really work that way.

Well, TOSSIM is intended to simulate the mote network, but more powerful 
resources like gateways or microservers. Many WSNs use patches of homogenous 
nodes that run an application: take a look at typical applications described in 
research papers. It's true that many applications also use heterogeneous 
setups, although not so many or so critically that anyone has been motivated to 
change TOSSIM to support this.

> 
> So my question is: how does TOSSIM handle the instantiation of N motes? And 
> where does it do it?
> 

TOSSIM uses a flag in the nesC compiler than transforms each variable X into an 
array of variables X[], and each variable reference Y into an index into the 
array Y[n], where n is the currently executing node.

Phil

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to