[Tinyos-devel] improving FTSP interface
Omprakash Gnawali
gnawali at usc.edu
Fri Aug 8 10:49:04 PDT 2008
On Fri, Aug 8, 2008 at 10:34 AM, Branislav Kusy <kusy at stanford.edu> wrote:
>> 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.
>
>
In that case, excluding wraparound, there is no possibility that 5
units difference between previous time and current time is different
from 5 units?
- om_p
More information about the Tinyos-devel
mailing list