Hi, You can compile your WSN application with the "sim-sf flag" such as :"make micaz sim-sf".
Then modify your test file following the example that you can find in tos/lib/tossim/sf/examples and look at TestSerial.py. Finally, in your Java code, instantiate a "MoteIF" and set the MOTECOM to the SF that you declared in your tossim script, MoteIF a class that you find in the tinyos.jar (support/sdk/java). With that class, you can send to the serial, and create listeners to receive from a particular AM type. The TOSSIM SF extension will look at the address of the serial packet to know to which node to send. It does not recognize the broadcast address for the serial packet.. If you want to control your tossim simulation from Java, then you can use Jepp if you use python, it's pretty easy to do, or JNI and then you could call your c++ methods controlling the simul (not that straightforward to do). HTH, Alban 2009/1/29 francisco cassimiro <[email protected]>: > Hello staff, > > I would like you to clarify how to connect an application simulated in > TOSSIM with java code. > > More specifically how to connect the application SerialForwarder with a > basestation of simulation in tossim. > > Thank you very much. > > -- > Francisco Cassimiro Neto. > Antes de tudo, filho de Deus! > > _______________________________________________ > 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
