[Tinyos-help] Strange error about type definition

Flavio Pompermaier fla83tn at libero.it
Thu Feb 14 03:58:42 PST 2008


I fixed the problem changing struct to nx_struct in the declarations as you told me..Initially I didn't understand what you adviced me!
Thanks..

---------- Initial Header -----------

>From      : "David Gay" dgay42 at gmail.com
To          : "Flavio Pompermaier" fla83tn at libero.it
Cc          : "Help TinyOS" tinyos-help at millennium.berkeley.edu
Date      : Wed, 13 Feb 2008 18:36:40 -0800
Subject : Re: [Tinyos-help] Strange error about type definition







> On Feb 13, 2008 3:23 PM, Flavio Pompermaier <fla83tn at libero.it> wrote:
> > Hi to all,
> > I have a very problem in defining a message types to send over the radio!
> > I want to make they endianess-indipendent so I use the nx_ suffix with structures and basic types.
> > However, when I compile my application I get errors like the following:
> >
> > 'DataMsg' defined as wrong kind of tag.
> 
> Did you bychance previously declare (not define) "struct DataMsg"
> somewhere (e.g. used 'struct DataMsg *p' somewhere)? If so, you've
> told the compiler that DataMsg is a regular struct, so it complains
> when you later tell it that it's a nx_struct...
> 
> David Gay
> 
> > and this is the type definition:
> >
> > typedef nx_struct DataMsg{
> >    nx_uint16_t dato;
> >    ControlInfo control;
> > } DataMsg;
> >
> > typeDef nx_struct ControlInfo{
> >   nx_uint16_t some_info;
> > } ControlInfo
> >
> > Is it because I use a type inside another one??
> > Could anyone help me??
> >
> > Thanks in advance,
> > Flavio
> >
> >
> >
> > _______________________________________________
> > Tinyos-help mailing list
> > Tinyos-help at millennium.berkeley.edu
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >
> 




More information about the Tinyos-help mailing list