Hello,
I need to send to UART and Radio at a time, but only one of SendMsg calls
works... What is the problem? Parameterized interfaces solves the problem?
*
*
*MyApp.nc*
[...]
MyAppM.SendMsg -> Comm.SendMsg[AM_XSXMSG]; //AM_XSXMSG=0
MyAppM.UARTMsg -> Comm.SendMsg[AM_XSYMSG];//AM_XSYMSG=1
[...]
*MyAppM.nc*
[...]
uses {
interface Timer;
interface Leds;
interface ReceiveMsg;
interface SendMsg;
interface SendMsg as UARTMsg;
}
[...]
void task SendFlag()
{
atomic sending_packet = TRUE;
if (call SendMsg[AM_XSXMSG].send(port,sizeof(XDataMsg),&msg_buffer) !=
SUCCESS)
sending_packet = FALSE;
return;
}
void task SendData()
{
atomic sending_packet = TRUE;
if (call UARTMsg.send(TOS_UART_ADDR,sizeof(YDataMsg),&msg_buffer2) !=
SUCCESS)
sending_packet = FALSE;
return;
}
Sorry for my bad english, and thanks in advance.
Xavi
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help