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

Miklos Maroti mmaroti at math.u-szeged.hu
Thu Dec 13 05:20:27 PST 2007


Dear All,

> > interface PacketTimeSynch<precision_tag, size_type> {
> >   async command void set(message_t* msg, size_type eventTime);
> >   async command bool isSet(message_t* msg);
> >   async command size_type get(message_t* msg);
> > }

Another, maybe less controversial interface would be a callback:

interface PacketLastTouch
{
    async event lastTouch(message_t* msg);
}

which would be called AFTER the packet has been timestamped with
the PacketTimeStamp interface and before it was actually transmitted.
This would allow to do last touch modifications to the message just
when it is going out. The ActiveMessageC would provide this interface
with am_type dispatch:

   provides PacketLastTouch[am_type am];

and the default implementation would do nothing.

ADVANTAGES:

- AM_TYPE specific, no need for extra bit in the footer
- Does not constrain the type of time synch protocol, width and precision

DISADVANTAGES:

- On some architecture maybe it is not possible to provide this
call after the message is time stamped and/or the MAC does not
know what part of the message has been modified.

It is important that this call is called AFTER the packet is time
stamped, otherwise we cannot guarantee precise timing.

What do you guys think?

Miklos


More information about the Tinyos-devel mailing list