Hi Felipe,
In line 110, you are declaring a typedef "frmCtrl_rx" as a pointer to a
frameCtrl_t structure. But that's the typedef only; you never actually
declared a variable of your typedef. You need to declare a variable of
type frmCtrl_rx and then do the assignment, e.g.:
typedef frameCtrl_t* frmCtrl_rx;
frmCtrl_rx myVariable;
...
myVariable = call FrameControl.getFrmCtrlFields((nx_uint16_t)WNRx->FrmCtrl);
Otherwise you are trying to assign a value to a typedef, not to an
actual variable ;-)
Saludos
On 02/22/2012 09:45 AM, Michael Schippling wrote:
> That looks ok to me syntactically so maybe there's something
> else wrong. You might have a hidden character in your text,
> if you can use a hexdump utility to look at the file you
> could find something amiss, or, unlikely, also in the
> FrameControl file too... Also try moving the lines and
> elements around to see if the error moves with them.
>
> If there were errors in definitions and such you probably
> would get something besides "syntax error".
>
> Hopefully someone with better eyes will spot something.
> MS
>
>
> Felipe Cruz Martínez wrote:
>> Hello,
>>
>> I’m sure that it is an error very easy to resolve...
>>
>> /_Code:_/
>> /__/
>> / [...]/
>> / [110] typedef frameCtrl_t* frmCtrl_rx;/
>> / [111] ieee802155cmd_t* WNRx = (ieee802155cmd_t*)payload;/
>> / *[112] * frmCtrl_rx = call
>> FrameControl._getFrmCtrlFields_((nx_uint16_t)WNRx->FrmCtrl);/
>> /[...]/
>> //
>> /(Function _getFrmCtrlFields_ returns a frameCtrl_t*)/
>> //
>> /_Error:_/
>>
>> /In component `WakeupExampleC':/
>> //
>> ///WakeupExampleC.nc: In function `Receive.receive':/
>> /WakeupExampleC.nc:*112*: *syntax error before `='*/
>> //
>> //opt/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning:
>> #warning "*** L/
>> /OW POWER COMMUNICATIONS DISABLED ***"/
>> /make: *** [exe0] Error 1/
>>
>> /----------------------------------------------------------------------------------------------------------------------------------/
>> //
>> /frmCtrl_rx is a pointer to a type structure frameCtrl_t:/
>> //
>> /typedef nx_struct frameCtrl {/
>> / /
>> / nx_uint16_t FrmCtrl; //Este va a ser el famoso campo de 2
>> bytes. /
>> / nx_uint8_t protocolVersion; /
>> / nx_bool frameType;/
>> / nx_bool destAddMode;/
>> / nx_bool srcAddMode;/
>> / nx_uint8_t txOptions;/
>> //
>> /}frameCtrl_t;/
>> //
>> I don’t understand why compiler gives me an error.
>>
>> I hope someone can help me, thanks very much.
>> //
>> //
>>
>>
>> //
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Tinyos-help mailing list
>> [email protected]
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help