[Tinyos-help] C++ and Python
Sankar Gorthi
sankar.b.gorthi at gmail.com
Thu Nov 23 10:59:30 PST 2006
The Kernighan and Ritchie book on C should be a good place to start.
If you already have though, you should look at the header files in the
same folder, because that's usually where the definitions of structures
are placed.
Sankar.
On Thu, 23 Nov 2006 12:40:27 -0600, fatima cabot <thisismydo at gmail.com>
wrote:
> In lesson11 of the tutorial the example shows:
>
> #include <tossim.h>
>
>
>
> int main() {
> Tossim* t = new Tossim(NULL);
> Radio* r = t->radio();
>
> for (int i = 0; i < 999; i++) {
> Mote* m = t->getNode(i);
> m->bootAtTime(5000003 * i + 1);
> r->setNoise(i, -99.0, 3);
> for (int j = 0; j < 2; j++) {
> if (i != j) {
> r->add(i, j, -50.0);
> }
> }
> }
>
> for (int i = 0; i < 1000000; i++) {
> t->runNextEvent();
> }
> }
>
> Where can I find the documentation for understanding and using methods
> such as 'r->add,->setNoise,t->runNextEvent' or for the Tossim object
> itself?
--
No opera plot can be sensible, for people do not sing when they are
feeling sensible. - W. H. Auden
More information about the Tinyos-help
mailing list