On Nov 3, 2009, at 4:33 AM, [email protected] wrote:

> Hi,
>
> I'm programming at the moment a little application, where it is  
> desired, to use
> random numbers.
>
> I looked at thedocumentation, there is a RandomC, wich is like a  
> wrapper for
> RandomMlgcC (and the other not so good one...).
>
> Now, I added this to my configuration:
>
> components RandomC;
>
> and
>
> App.Random -> RandomC;
>
> In my module file, I added this:
>
> interface Random;
>
> What should I do now, to initialize the generator? I thought, I  
> should do sth.
> like Random.init() in the Boot.booted() method, but this is not the  
> right way.
>
> So, please, any hints how to start (and use) the generator.
>
> Would be very kind!

The generator is automatically initialized. Just use the Random  
interface to get random numbers. You can also re-initialize the RNG if  
you want.

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

Reply via email to