[Tinyos-help] How to declare a pointer to user defined structure

JD chokshi.jaydeep at gmail.com
Thu Dec 11 14:53:57 PST 2008


Greetings Folks,

Thanks a lot for the reply. I moved that declaration in to _implementation_
block instead of function and it worked fine.

Thanks,
JD
---------------------------
Love All, Serve All
----------------------------

Dwight L. Moody  - "I have had more trouble with myself than with any other
man I've met."

On Thu, Dec 11, 2008 at 1:22 PM, Michael Schippling <schip at santafe.edu>wrote:

> That looks fine to me...
>
> Perhaps there is something else wrong in the file before
> you get to the declaration? Try moving it around. And then
> start eliminating stuff...my suspicious nature would start
> with the nx_ things...
>
> MS
>
> JD wrote:
>
>> Greetings Folks,
>>
>> I've a stupid (I believe) question.  I've following structure defined in
>> header file,
>>
>> typedef nx_struct __msg
>> {
>> CommonHeader cmnHdr;
>>
>> nx_union
>> {
>> InitMsg    __iMsg;
>> AckMsg   __aMsg;
>> } __msgType;
>>
>> } ActiveMessage;
>>
>> Now in the module implementation, I try to declare a pointer as follows,
>>
>> ActiveMessage *pMsg = NULL;
>>
>> Doing so, nesc gives me following error,
>> "Syntax errorr before * "
>> "pMsg undeclared"
>>
>> Nothing clicks me if what exactly I'm doing wrong out here. I sure its
>> something really stupid, I guess.
>>
>> Please let me know if you find me doing thing wrong.
>>
>> Thanks,
>> JD
>> ---------------------------
>> Love All, Serve All
>> ----------------------------
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Tinyos-help mailing list
>> Tinyos-help at millennium.berkeley.edu
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>
> --
> Platform: WinXP/Cygwin
> TinyOS version: 1.x, Boomerang
> Programmer: MIB510
> Device(s): Mica2, MicaZ, Tmote
> Sensor board: homebrew
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20081211/e5a20454/attachment.htm 


More information about the Tinyos-help mailing list