Paul, Thanks again for your clear answers.
Yes, I think like you.So due to this issue I can't test time synchronization algorithms in TOSSIM,am I right ?Or maybe there is some interface for doing this job .. ? sincerley, Mojtaba On Mon, Nov 16, 2009 at 9:58 PM, Paul Johnson <[email protected]> wrote: > Mojtaba, > > Actually, i believe the bootAtTime is in 100's of pico seconds (10^-10) > seconds. So 1024 * 10^-10 = 0.0000001024, and apparently sim_time_string() > returns time in seconds (up to nano seconds (10^-9)). There are actually > 1024 milli "ticks" per second, so this is why each timer fired is adding not > quite 1.0 to the time. > > As for your other issue, this is actually by design. If a node transmits a > broadcast packet, all other nodes in the transmission range will receive it > at the same time. The boot times only change when the node powers up, but > doesn't skew it's clock. In fact, i can't say for 100%, but I think that > sim_time_string() grabs the global simulation time, and there is no local > clock simulation is TOSSIM. > > -Paul > > mojtaba raznahan wrote: > > Hi Janos, > thanks for reply. > > What's the meaning of this numbers ? I set the bootAtTime event as these : > > *t.getNode(0).bootAtTime(1024); > t.getNode(1).bootAtTime(1320); > t.getNode(2).bootAtTime(6000)*; > > And i get the time by *"sim_time_string()*" method and it print the boot > times as this : 0:0:0.000000102 and 0:0:0.000000132 and 0:0:0.000000600 . As > i can guess 102 means "1024" MilliSec and 132 means "1320" Milil. > And I set the startPeriodic at 1000 ,some thing is ambiguous.The last > statement prints the time equal to 0:0:0.000000142 the next statment is * > Timer.startPeriodic(1000)*,but in the output when i print the time in * > Timer.fired()* event, it prints the time equal to *0:0:0.976562642* and > the later *0:0:1.953125142* ,* 0:0:2.929687642*, *0:0:3.906250142* what > does it mean ? > And also when i send a packet, the 2 other recievers get the packet at the > same time!!(I've set the bootTimes differently!). > > Thanks, > Mojtaba > > > > > On Mon, Nov 16, 2009 at 7:34 PM, Janos Sallai > <[email protected]>wrote: > >> In tossim, the node object in python has a bootAtTime method which >> lets you set when the mote boots. You can use this to make the local >> clock's offsets different from each other. By the way, TOSSIM does not >> simulate clock skew. This might limit the validity of the simulation >> results. >> >> Janos >> >> On Mon, Nov 16, 2009 at 7:55 AM, mojtaba raznahan >> <[email protected]> wrote: >> > Hi all, >> > >> > I want to know how can I set the local time of each mote >> programmatically ? >> > I want to set different local time for each node then test my >> > synchronization algorithm on them. >> > I used the LocalTime interface to get the local time but i can't set >> > different initial local time for each node.And LocalTime interface has 2 >> > type "TMilli" and "TMicro" but when i use TMicro then in configuration >> > section there isn't any component provider for it! .I'm using Tinyos >> 2.1.0 >> > and TOSSIM. >> > >> > Regards, >> > -- >> > Mojtaba Raznahan >> > BS of Computer engineering >> > TMU university >> > www.raznahan.com >> > >> > _______________________________________________ >> > Tinyos-help mailing list >> > [email protected] >> > >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> > >> > > > > -- > Mojtaba Raznahan > BS of Computer engineering > TMU university > www.raznahan.com > > ------------------------------ > _______________________________________________ > Tinyos-help mailing > [email protected]https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > > -- Mojtaba Raznahan BS of Computer engineering TMU university www.raznahan.com
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
