Hi all,
I am sorry to trouble you,Can you please explain the following question to me?
The following code is from tinyos-2.x/apps/BaseStation/BaseStationP.nc
task void uartSendTask() {
........
atomic
if (uartIn == uartOut && !uartFull)
{
uartBusy = FALSE;
return;
}
msg = uartQueue[uartOut];
tmpLen = len = call RadioPacket.payloadLength(msg);
id = call RadioAMPacket.type(msg);
addr = call RadioAMPacket.destination(msg);
src = call RadioAMPacket.source(msg);
call UartPacket.clear(msg);
call UartAMPacket.setSource(msg, src);
if (call UartSend.send[id](addr, uartQueue[uartOut], len) == SUCCESS)
call Leds.led1Toggle();
else
{
failBlink();
post uartSendTask();
}
}
/*Is it planning to acess radio message header,and deciding to send radio
message to serial?? If so, call UartSend.send it means to send radio message
to serial.Then why use call UartAMPacket.setSource(msg, src) ? What is its
role? Why no use call UartAMPacket.setDestination(msg, src) */
Thanks for kind help!
Sincerely
wkq
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help