Thanks for the reply.

That does not make clear my doubt ... Maybe I have not explained the best
way: there is a method rand() available in the C programming language, which
is also available in TinyOS. This method will not need any wiring or
anything else, it works simply by invoking the function rand().

My question is: what is the difference between this method rand() and method
rand16()/rand32() provided by RandomMlcgC?

On Wed, Jan 20, 2010 at 2:37 AM, Qiyuan Zhang <[email protected]> wrote:

> Hi, Ricardo.
>
> The interface Random provides two functions: rand16() and rand32(). 
> RandomLfsrC
> or RandomMlcgC is the specific implementations. Of course you can call
> functions from them directly. You can also provide your own implementation.
> Interface Random just provides an abstraction layer.
>
> Best wishes
>
> Qiyuan Zhang
>
>
>
> On Wed, Jan 20, 2010 at 5:59 AM, Ricardo . <[email protected]>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