If I post task there then it will be scheduled later and sendflag will not be 0 again by the time this code runs as post task delayed until sensor is free. Isn't there any other way i tried timer also but its giving segmentation fault.
Thanks Avinash Kumar Chaurasia Department of Computer Science IIT Kanpur, India On Fri, Apr 9, 2010 at 11:53 AM, Qiyuan Zhang <[email protected]> wrote: > who should set sendflag back to 0, in Channel.sendDone()? > if so, you can post a task there. > > Regards, > > Qiyuan > > On Fri, Apr 9, 2010 at 4:43 AM, avinash chaurasia < > [email protected]> wrote: > >> I have the following code >> if (sendflag==0) { >> sendflag=1; >> call Channel.send(node_s,msg); >> dbg("DBG_USR1","node%d send answer to node%d.\n",sID,node_s); >> } >> when sendflag =1 it skips the this part of code and never send a reply. >> I wanted to send reply later when sendflag=0. I tried task also but it is >> not working properly on tossim >> >> >> Thanks >> Avinash Kumar Chaurasia >> Department of Computer Science >> IIT Kanpur, India >> >> _______________________________________________ >> Tinyos-help mailing list >> [email protected] >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> > >
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
