I am using AMSend.Send() but it returns EOFF every time. Below is the code
snippet that i am using

command void Channel.send(uint16_t node, uint8_t *msgP) {
      //dbg("DBG_USR1","sending packet");
      int i,len=0;
      error_t err;
      if(!busy)
      {
        com_packet_t *payload =(com_packet_t *)(call
Packet.getPayload(&packet,sizeof(com_packet_t)));
        if(payload){
          payload->addr = node;
          payload->length = 29;
          len = sizeof(msgP);
          for(i=0;i<len;i++)
          payload->msgP[i] = msgP[i];
          node1 = node;
          msg1 = msgP;
        }
        counter =0;

        if ((err=call AMSend.send(AM_BROADCAST_ADDR, &packet,
sizeof(com_packet_t))) == SUCCESS) {
          busy = TRUE;
        }
        else if(err==EOFF)
        {
          dbg("DBG_USR1","EOFF\n");// this part of program always executed
        }
        else
        {
          dbg("DBG_USR1","Error\n");
        }
      }
    }
Thanks
Avinash Kumar Chaurasia



On Tue, Apr 6, 2010 at 2:36 PM, avinash chaurasia <
[email protected]> wrote:

> whenever i call a function it returns value 4( i think i,e EOFF). how
> should i remove it. i using TOSSIM for simulations
> Thanks
> Avinash Kumar Chaurasia
>
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to