[Tinyos Core WG] Re: AdcConfigure and struct return

Jan Hauer jan.hauer at gmail.com
Thu Oct 5 05:09:28 PDT 2006


Great! Looking at the notes there is only one (small) issue left for
TEP 101: parameterized types do not solve the problem of multiple
different ADCs concerning the naming of the HIL components. The
proposed solution was to prefix the respective component names
(AdcRead[Now|Stream]ClientC) with the chip name. Alternatively we can
ignore multiple ADCs in this TEP. I prefer the first option (but would
also agree to the second). Comments? I'll update the TEP and check in
the code as soon as we made the decision.

Jan

On 10/4/06, Philip Levis <pal at cs.stanford.edu> wrote:
> On Sep 22, 2006, at 6:53 AM, Jan Hauer wrote:
>
> >>
> >
> >  interface AdcConfigure<adc_config_t>{
> >    async command adc_config_t getConfiguration();
> >  }
> >
> > In the second option I can see two advantages: we don't make every
> > platform write an "Adc.h". And we can deal with multiple ADCs on the
> > same platform (don't know how likely this is, though). Can you see any
> > disadvantages ?
>
> The consensus on the call today was that this is the best approach.
> Not only do you have a single interface that can be used with
> different platforms, it will also play out nicely when trying to
> tackle the multiple ADCs on a single platform issue. E.g., the MDA300
> can provide its own AdcConfigure<mda300_adc_config_t> while the
> atm128 can provide the AdcConfigure<atm128_adc_config_t>. Generic
> components above that want to be able to be ADC-independent merely
> need to be generic components that have this type as a parameter.
> They cannot modify the structure regardless. so this works well.
>
> Phil
>
>


More information about the Tinyos-2.0wg mailing list