Added hack for letting nodes signal that they are 'done'. The simulator exits when all nodes are done. Fixed random initialization so that it is different for all nodes.

This commit is contained in:
adamdunkels 2006-10-23 09:01:06 +00:00
parent 0ed1d401d5
commit c67ce1c1b0
9 changed files with 89 additions and 21 deletions

View file

@ -30,7 +30,7 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: ethernode.c,v 1.2 2006/10/06 08:25:31 adamdunkels Exp $
* $Id: ethernode.c,v 1.3 2006/10/23 09:01:06 adamdunkels Exp $
*/
/**
* \file
@ -181,7 +181,7 @@ ethernode_send(void)
dest = ID_BROADCAST;
/* usleep(800 * (random_rand() % 1000));*/
usleep(100 * (random_rand() % 1000));
do_send(TYPE_DATA, dest, hdr, len);