[Tinyos-devel] Re: TEP 101 - the proposal for ADC interfaces

David Gay dgay42 at gmail.com
Fri Feb 25 09:50:06 PST 2005


On Fri, 25 Feb 2005 00:13:49 -0800, Yuval Peduel
<yuvalpeduel at digitalsun.com> wrote:
> Note that in some cases, people use the stop/start methods of StdControl
> for putting components to sleep and waking them up. For some components
> (those that people care about most), the code has been carefully crafted
> to support this usage. But if it is part of the spec for start and stop,
> then I haven't seen it, and judging from the implementations I've seen,
> most of the implementors of components don't see this as a requirement.

Well, start and stop are the "official" way of putting components into
a low-power mode. Yes, most of them don't pay that much attention to
this issue.

> (Most components do not count the number of start() calls they get, but
> stop with the first call to stop() rather than when the number of stop()
> calls equals the number of start() calls. That means that the ordering
> requirements, when two components use a common lower-level component,
> are violated.)

There clearly needs to a TEP on this (the interfaces are changing for
2.x anyway). I'm in favour of counting myself, but I believe Phil had
a slightly different proposal (somewhere in oski IIRC). Phil?

On a related note, generic components make for a nice way of doing
this kind of start/stop counting without having to reimplement it in
every component. You can write your code under the assumption that you
don't get repeated starts, and that you can stop immediately when
'stop' is called. The generic module provides and uses StdControl, and
 uses a counter to forwards the first "start" and the last "stop"...

David Gay


More information about the Tinyos-devel mailing list