Hi,

I'm new to TinyOS. I started programming for a simple application with two nodes. One is the master and the other one is the slave. My question is that how to specify the address of the two nodes. What I did is that I use TOS_LOCAL_ADDRESS and compare it's value with 0.

event result_t Timer.fired()
{
  if (TOS_LOCAL_ADDRESS == 0)
   // this is a master, send a beacon
 else
   // this is a slave, receive a beacon
....
}

But during debugging with TOSSIM, the value of TOS_LOCAL_ADDRESS is always 0. Can someone tell me where is TOS_LOCAL_ADDRESS originally defined? Why it is always 0? What are the better ways to implement? Thanks a lot.

Best Regards,
Redmuts

_________________________________________________________________
Live Search, for accurate results! http://www.live.nl

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

Reply via email to