[Tinyos-devel] improving FTSP interface
Branislav Kusy
kusy at stanford.edu
Fri Aug 8 10:34:23 PDT 2008
> On Fri, Aug 8, 2008 at 12:11 AM, Miklos Maroti <mmaroti at math.u-szeged.hu> wrote:
>>> One other topic when we are trying to improve FTSP interface - Let's
>>> say, FTSP says the current time is 5 and later it says the current
>>> time is 10, do I know if 5 units of time have elapsed? We probably
>>> want another bit to tell if there was any desync/sync event since the
>>> last read.
>> Do you assume that your component is the only user of FTSP? If not,
>> then you need a parameterized interface to support this! Would not it
>
> Right, we should not assume that only one component is allowed to read the time.
>
>> be enough if your component maintains the last read global time, and
>> if the new global time is smaller than the last one (can be detected
>> with the "(int32_t)(new_global_time - last_global_time) < 0" which
>> takes into account the wraparound) then you had a decrese. You can
>> also achieve this with the overflow bit.
>
> Even if the current time is larger than the previous time, we can not
> preclude wraparound unless we put constraints on the minimum frequency
> at which an application must read the time.
>
> Even if the current time is larger than the previous time by t units,
> we can not be certain that t units of have have elapsed because it is
> possible that we are now following the time of a new leader and t +/-
> delta with the new leader has elapsed. In this case, it would be good
> to know that we changed the leader since the last read so the time
> reading should not be compared with the last read time.
new leader will broadcast global time consistent with the old leader.
this is one of the ftsp's core mechanisms. so applications need not
worry about this.
More information about the Tinyos-devel
mailing list