TOS_LOCAL_ADDRESS is set to the ID of each node, either by modifying the
program before uploading it to a physical node, or by the simulator. TOSSIM
apparently starts numbering at zero. If you run the simulation with two
nodes, you'd have one with TOS_LOCAL_ADDRESS equal to 0 and one with
TOS_LOCAL_ADDRESS equal to 1.
Michiel


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Renee
Azhen
Sent: dinsdag 11 december 2007 1:51
To: [email protected]
Subject: [Tinyos-help]:why does TOS_LOCAL_ADDRESS become 0 not 1?

Dear all:

in opt\tinyos-1.x\tos\system\tos.h, here is the definition:
uint16_t TOS_LOCAL_ADDRESS =1;
 
but when I use dbg(DBG_USR1, "0x%02x\n", TOS_LOCAL_ADDRESS); to print the
value, the printed result is 0x00, not 0x01.
 
Do anyone know why??
 
Thanks
Sam

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

Reply via email to