[Tinyos-devel] Re: [Tinyos Core WG] time sync interfaces

Philip Levis pal at cs.stanford.edu
Thu Dec 13 12:18:59 PST 2007


On Dec 13, 2007, at 11:41 AM, John Griessen wrote:

> David Gay wrote:
>> On Dec 13, 2007 5:20 AM, Miklos Maroti <mmaroti at math.u-szeged.hu>  
>> wrote:
>
>>> interface PacketLastTouch
>>
>
>>> It is important that this call is called AFTER the packet is time
>>> stamped, otherwise we cannot guarantee precise timing.
>
>> An alternate proposal would be:
>> interface PacketTimeSync
>> {
>>     async event int8_t isTimeSyncPacket();
>> }
>> which would be:
>> - offered as a parameterized-by-amid interface (like PacketLastTouch)
>> - called from the radio stack at the "last possible moment"
>> - if isTimeSyncPacket returns -1, nothing happens
>> - if isTimeSyncPacket returns X (>= 0), a time stamp is stuffed in  
>> the
>> packet at offset X
>
> These are about putting the local time into an outgoing packet...   
> precise
> time comes from comparing to one source that is a master clock...  
> by way of round trips
> with time counting along as you go, being different when returned  
> to the master, after which you issue a difference correction  
> command.  So stamping a packet
> just received with a local time helps do that, not a packet going  
> out...

Not necessarily; you're assuming an NTP-like approach. There are a  
lot of alternative approaches, some of which are more precise. The  
two major papers on this are RBP (OSDI 2002) and FTSP (SenSys 2004).

Phil



More information about the Tinyos-devel mailing list