[Tinyos-devel] LocalTime interface
Andreas Koepke
koepke at tkn.tu-berlin.de
Mon Dec 3 06:37:34 PST 2007
Since the semantic meaning of an interface is in its name, moving to
Counter would no do, at least w.r.t the tinyos philosophy.
2. is not possible: the return type is not (yet?) generic
Miklos Maroti:
> Obviously you need a new interface for that: say LocalTime64 or something,
> but maybe it would be better to
>
> 1) use the generic Counter interface for this, or
> 2) move LocalTime to generic as well.
>
> Miklos
>
> On Dec 3, 2007 3:05 PM, Andreas Koepke <koepke at tkn.tu-berlin.de> wrote:
>> But how do I call LocalTime.get() on this component? It will reduce the
>> value back to 32 bit...
>>
>> Miklos Maroti:
>>
>>> Hi Andreas,
>>>
>>> Use TransformCounterC to get a 64-bit counter, then write your
>>> version of localtime similar to CounterToLocalTimeC. All this
>>> is from lib/timer. (Or you would easily do this by hand and
>>> with a periodic timer that gets executed at least once at every
>>> 0.75 days to notice that you are close to overflow on the 32-bit
>>> integer).
>>>
>>> Best,
>>> Miklos
>>>
>>> On Dec 3, 2007 2:49 PM, Andreas Koepke <koepke at tkn.tu-berlin.de> wrote:
>>>> Hi guys, I'm experimenting a little with synchronization and use the
>>>> 32kHz clock for this. Unfortunately, the LocalTime interface is only 32
>>>> bit wide, so that I have to handle clock wraps every 1.5 days. What
>>>> would be the best way to introduce a 64 bit wide LocalTime interface?
>>>>
>>>> Best regards, Andreas
>>>>
>>>> _______________________________________________
>>>> Tinyos-devel mailing list
>>>> Tinyos-devel at Millennium.Berkeley.EDU
>>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel
>>>>
>>
>
More information about the Tinyos-devel
mailing list