I also should of added in the question I asked before, that I tried doing the
following:

uses interface Random;
uses interface ParameterInit<uint16_t> as r;

Both of them Are Wired to:

App.Random -> RandomMlcgC;
App.r -> RandomMlcgC;

so my method looks like:
uint16_t generate_random(uint16_t counter){
        if(call r.init(counter)==SUCCESS){
                rand = call Random.rand16();
        }
        return rand;
}

Where counter is a value read by sensors, could be the Light, Temp etc...
However I still get similar numbers every time I run this in Tossim, so I am not
sure if I actually used ParameterInit<uint16_t> correctly or if i am calling
Random.rand16() correctly..

Thanks in advance for any help...
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to