> when a node receives a message, it starts a random timer, then is 
> broadcasts the message after the timer expire. like 
> event TOS_MsgPtr receive(TOS_MsgPtr m);
>  {
>    start a random timer;
>    when the timer expire, broadcast the message;
>  }
> Is there any one who knows how to use the random timer in this case? Any 
> suggestion is appreciated. Thanks

Use the Random interface and the RandomLFSR component.  See

  tos/interfaces/Random.nc
  tos/system/RandomLFSR.nc

If you're not sure how to use these, review the tutorial.

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

Reply via email to