This looks like TinyOS 1.x; in 1.x you can't send to the radio and serial port 
simultaneously. In 2.x you can.

Phil

On Aug 16, 2010, at 8:45 AM, Xavi Colomer wrote:

> 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
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to