The address of the mote is specified when uploading the program onto that particular mote. Check "Device Addressing" section at http://www.tinyos.net/tinyos-1.x/doc/tutorial/programmers.html
If you are using TOSSIM, then addresses are allocated by default from 0 to N-1 Tarun http://bansal.tarun.googlepages.com/ On 2/12/07, qin zhao <[EMAIL PROTECTED]> wrote:
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 Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help