*sim_time()* returns the number of (virtual) ticks spent since the beginning of simulation.
Its value is only increased upon various *events*, and the incremented value is determined by respective models (i.e. tos/lib/tossim/*Model*). For example, the increment of *sim_time* caused by packet transmission is determined by the packet model (TossimPacketModelC.nc). If sim_time() does not increase, that typically means your app hasn't trigger any *event* that increases *sim_time* so far. On Tue, Jun 22, 2010 at 1:06 AM, Sam Azzaro <[email protected]> wrote: > Hi all, > i want to determinate the sim_time of an appliaction on Tossim > but i always get the same one wich is the time when starting boot! > administrat...@v8fmk15ebx5la4b /opt/tinyos-2.x-contrib/crypto/apps/My_app > $ python > Python 2.5.1 (r251:54863, May 18 2007, 16:56:43) > [GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin > Type "help", "copyright", "credits" or "license" for more information. >>>> from TOSSIM import * >>>> t = Tossim([]) >>>> m = t.getNode(25) >>>> m.bootAtTime(45654) >>>> import sys >>>> t.addChannel("Boot", sys.stdout); >>>> t.runNextEvent() > DEBUG (32): setup done @ Time: 0:0:0.000004565 > 1 > Could anyone explain me how can i get the time of simulation ? > Thanks in advance > Sam, > ________________________________ > Hotmail : une messagerie fiable avec une protection anti-spam performante > Inscrivez-vous > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- Best Regards, LIU Yu _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
