[Tinyos Core WG] Re: TEP 102
David Gay
dgay42 at gmail.com
Wed Oct 18 12:04:11 PDT 2006
On 10/18/06, Cory Sharp <cory at moteiv.com> wrote:
> Quick question: in section 3 we list the standard Alarm and Counters
> components than should exist for the precision and widths provided by the
> platform. Do we want to provide for a LocalTime component, as well?
> LocalTime is actually useful when you don't care to handle with the overflow
> event, which is common in applications. But, there are a couple of unique
> things about LocalTime
>
> * The width of a LocalTime interface is always 32-bits, so the LocalTime
> components would only by precision
>
> * The transformation from Counter to LocalTime is trivial, and can be
> derived from the Counter${P}32C components. So, instead of prescribing
> LocalTime components for the platform, do we want to just create in
> tos/lib/timers/ the three LocalTime${P}C components for the standard
> precisions in the TEP?
Hmm, after thinking a bit, I still have no opinion ;-)
For:
- avoids writing the same uses of CounterToLocalTime in a bunch of places
- provides consistent name for LocalTime
Against:
- currently, LocalTime is available via HilTimerMilliC only
(strangely not in TimerMilliC) (ok, this is not exactly an against -
but having LocalTime in two places seems slightly confusing)
- Counter${P}32C may not always exist, so the appearance that
LocalTime${P} exists may be confusing
Hmm, after writing that, I'm vaguely in favour. I also wonder if we
should put LocalTimeMilliC in the HIL? Or provides interface
LocalTime<TMilli> in TimerMilliC?
David
More information about the Tinyos-2.0wg
mailing list