[Tinyos Core WG] non-TEP code

Jonathan Hui jhui at archrock.com
Tue Nov 28 08:44:29 PST 2006


 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.

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.

--
Jonathan Hui
jhui at archrock.com


Joe Polastre wrote:
>> Good points. My thought is that if the interface name "Button" is
>> being used, then it needs to be the general interface. But if it's
>> that, it doesn't seem like what we're talking about is a button,
>> rather a contact sensor. So while the component might be named
>> "TelosResetButtonC", its interface might be ContactSensor.
> 
> Phil, now we're really going down a rathole.  It is a button, and it
> is as generic as buttons go.  It is NOT a contact sensor--a contact
> sensor would encompass capacitive sensors as well, which is a whole
> different rathole I don't want to get into.
> 
> Button is a very well defined concept and I don't know why you're
> making up new names for "button".  Definition 3a of "button" according
> to Merriam-Webster is a "Push Button" defined to be "a small button or
> knob that when pushed operates something especially by closing an
> electric circuit".
> 
>> I think these distinctions come from the differences between
>> maintaining a platform-specific software base (Boomerang) and a cross-
>> platform software base (2.x).
> 
> I completely disagree.  This is not a platform-specific argument!
> 
> I believe Gil has had the most reasonable discussion here and I agree
> with his points.  I'm content with a Get/Notify interface (can you
> expand on exactly what this would look like?) that would be a generic
> in chips/button, with a specific mapping that exists in each platform
> or sensor/sensorboard that has buttons.
> 
> I'm happy to work with Gil to proceed with the above proposal and
> ignore this silly discussion of "contact sensors"
> 
> -Joe
> _______________________________________________
> Tinyos-2.0wg mailing list
> Tinyos-2.0wg at Mail.Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-2.0wg
> 


More information about the Tinyos-2.0wg mailing list