Hi,

I am trying to read the tx power on the Sending mote in the RssiDemo code.
The strange thing is if I do:

message_t msg;
RssiMsg* buf = (RssiMsg*)(call RssiMsgSend.getPayload(&msg,
sizeof(RssiMsg)));
tx_power = call PacketTransmitPower.get(&msg);

Then everything compiles OK.

But if I reversed the calls like this:

tx_power = call PacketTransmitPower.get(&msg);
RssiMsg* buf = (RssiMsg*)(call RssiMsgSend.getPayload(&msg,
sizeof(RssiMsg)));


Then I got an error:
"syntax error before `*' " for the second line.

I am curious why?

David
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to