Hi guys,

In my implementation, I need to get the head of my SendQueue and
transmit it. The SendQueue has the format NewDataMsg. So can I send
the packet like this?

module NewSenseC {
 uses {
 ...
 interface Queue<NewDataMsg*> as SendQueue;
 ...
 }
}

implementation {
...
if (!call SendQueue.empty()) {
 NewDataMsg* rsm = call SendQueue.head();
 call AMSend.send(AM_BROADCAST_ADDR, &rsm, sizeof(NewDataMsg))
 ...
}

the code can be compiled through, but the packet it sent is not what I
asked. and also the compiler give me warning like this

NewSenseC.nc: 113 : warning: passing argument 2 of 'AMSend.send' from
incompatible pointer type.

I know there is sth wrong but I can't figure it out.
Need Help! Thanks in advance!

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

Reply via email to