[Tinyos-help] Send the head of the Queue
Yang Bofu
yangbofu at gmail.com
Mon Oct 15 19:46:14 PDT 2007
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
More information about the Tinyos-help
mailing list