Generally there is a way to "seed" the random value
such that it starts in a different position. You could
use the moteID so each node uses the same "random"
sequence after initialization, or read an un-connected
ADC to get a noise value and make it start anywhere.
MS


Ricardo . wrote:
> Hello everyone!
> 
> I want to generate random numbers, I know that I can use RandomLfsrC or 
> RandomMlcgC. However, the RandomLfsrC is out of question because it 
> generates always the same sequence in all nodes.
> 
> My question is: what is the difference of using RandomMlcgC instead of 
> calling directly the function rand() (which I do not even know which is 
> the component that provides the functionality)?
> 
> I appreciate any explanation.
> 
> Regards,
> Ricardo
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to