[Tinyos-devel] Bug in AM.h in T2 release

Joe Polastre joe at polastre.com
Mon Nov 20 12:45:53 PST 2006


Follow on:

If this is the case, then AM_BROADCAST_ADDR should have a
corresponding AMPacket.broadcast() for acquiring the radio specific
broadcast address.

Best,
-Joe

On 11/20/06, Joe Polastre <joe at polastre.com> wrote:
> Then it should be completely removed to prevent confusion.
>
> -Joe
>
> On 11/20/06, Philip Levis <pal at cs.stanford.edu> wrote:
> > On Nov 20, 2006, at 12:09 PM, Joe Polastre wrote:
> >
> > > FYI,
> > >
> > > TOS_AM_ADDRESS will never get updated on a 'make platform reinstall'
> > > command because it is statically compiled into the app.  See the
> > > following from AM.h:
> > >
> > > #ifndef DEFINED_TOS_AM_ADDRESS
> > > #define DEFINED_TOS_AM_ADDRESS 1
> > > #endif
> > >
> > > enum {
> > >  TOS_AM_GROUP = DEFINED_TOS_AM_GROUP,
> > >  TOS_AM_ADDRESS = DEFINED_TOS_AM_ADDRESS
> > > };
> > >
> > > A quick fix (proposed by Cory) is to #define TOS_AM_ADDRESS to
> > > directly call the AM.address() function.
> >
> > This is intentional: you should never be using TOS_AM_ADDRESS, rather
> > you should be calling AMPacket.address(). This is for cases when you
> > have two radios which might have different AM addresses.  The #define
> > will break whenever you have have an "as" on the interface.
> >
> > Phil
> >
>


More information about the Tinyos-devel mailing list