[Tinyos Core WG] non-TEP code

Philip Levis pal at cs.stanford.edu
Tue Nov 28 09:15:53 PST 2006


On Nov 28, 2006, at 8:44 AM, Jonathan Hui wrote:

>
> From my point of view, the most generic button interface is  
> something very similar to the GpioInterrrupt interface. There's  
> enables, there's edge triggers, and possibly level triggers. I can  
> see a developer caring about a single edge, both edges, and even a  
> level triggered form (all of which can be emulated if need be). The  
> basic Button interface you've proposed is a subset of this.
>
> From that point of view, we've gone down this path before (e.g.  
> static binding vs. not, how to deal with edge vs. level, platforms  
> that provide both-edge mode vs. only single-edge mode, etc). We can  
> either take decisions made in the past or re-open the issue. Either  
> one is fine with me, but we should take advantage of their  
> similarities. It's not immediately clear to me why the two  
> interfaces should have significant differences in philosophy.

Agreed. There are already several interfaces and approaches in place  
which are very similar. It's important to consider whether adding a  
new "similar but different" approach is worthwhile. This is a  
tradeoff between the possibly increased complexity of use with the  
current interfaces vs. the complexity of adding another interface for  
a specialized purpose.

>
> I know that you were going for a richer interface with  
> ButtonAdvanced. I could see some of that functionality useful in  
> more generic interrupt-driven settings, even those that are not  
> human driven. But maybe I'm trying to generalize this too much.

Exactly. There seem to be two ways to take this. The first is to  
assume that a Button is an HCI element and therefore provide  
functionality for writing simple UIs. This then raises the question  
of what the HAA is like under the high-level abstraction. The second  
is to assume that a Button is not necessarily an HCI element (e.g., a  
bump sensor), on top of which you then might design an HCI-oriented  
interface. This is the approach taken with Button/ButtonAdvanced.

Maybe the answer is to drop Button as SIDs can satisfy its needs  
fine, and to change ButtonAdvanced to Button as it is an HCI-oriented  
interface.

Phil

  


More information about the Tinyos-2.0wg mailing list