Hi,
The robocode you sent gave a deep insight.Thanks Micheal.
One question;How long(in micro seconds) will the mote wait before
doing retransmission? This should be protocol specific.
Regards,
Kishore
On Wed, Jul 30, 2008 at 10:29 PM, Michael Schippling <[EMAIL PROTECTED]> wrote:
> Lets keep this on the help list....
>
> As for loop 1, if you enable ACKs in the protocol they are handled
> in the lower levels and sendDone() is not called until the message
> is ACKed or times out. Search this list for many ACK explanations,
> and references to my robocode that makes extensive use of ACKs.
>
> As for message copy. You need a message buffer that lasts at least
> until all the sends are Done. If you can keep track of the buffer
> from the original message then you can just re-use it, otherwise
> you should copy it before trying to send again because the send
> operation will last longer than the scope of the function call,
> task or not...
>
> MS
>
>
> ram kishore wrote:
>>
>> Hi,
>>
>> I put loop 1 because I want a message (ACK) to be received after a
>> message is sent.Thats why I switched to Receiving mode.
>> Secondly,putting the re-transmit into separate task and post it form
>> done() would require the message to be copied again, which is memory
>> inefficient.
>>
>> Regards,
>> Kishore
>>
>> On Tue, Jul 29, 2008 at 11:28 PM, Michael Schippling <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> beats me...why are you doing loop 1? by the time you get to done()
>>> transmission should be complete. Also I would put the re-transmit
>>> into a separate task and post it from done()...
>>>
>>> MS
>>>
>>> ram kishore wrote:
>>>>
>>>> Hi,
>>>> I did the following:
>>>>
>>>> event result_t RsendMsg.sendDone(TOS_MsgPtr msg, result_t
>>>> success)
>>>> {
>>>> result_t txmode,sndmsg;
>>>>
>>>> TOSH_uwait(1000);
>>>>
>>>> do{
>>>> /*LOOP 1*/
>>>> txmode = call CC1000Control.RxMode();
>>>> }while(!txmode);
>>>> if ( txmode == SUCCESS )
>>>> call CLeds.yellowOff();
>>>>
>>>> do{
>>>> /* LOOP2*/
>>>> sndmsg = call RsendMsg.send(TOS_BCAST_ADDR,12,msg);
>>>> }while(!sndmsg);
>>>> if ( sndmsg == SUCCESS )
>>>> call CLeds.yellowOn();
>>>>
>>>> return SUCCESS;
>>>> }
>>>>
>>>> If I remove LOOP 1, then retransmissions occur.But, when LOOP 1 is
>>>> included no retransmissions occur.
>>>> What could be the reason.?
>>>>
>>>> Regards,
>>>> Kishore
>>>> On Mon, Jul 28, 2008 at 11:44 PM, Michael Schippling <[EMAIL PROTECTED]>
>>>> wrote:
>>>>>
>>>>> Just some things to try...
>>>>>
>>>>> I'd bet that the message buffer gets reused or erased before your
>>>>> second send can complete. You may also have trouble calling the
>>>>> send directly from the done, since done is in an "event"
>>>>> context which is sometimes tantamount to an interrupt, perhaps
>>>>> try copying the message and posting a task to resend?
>>>>>
>>>>> Another possibility is that you are walking over the "normal"
>>>>> send process. You should check the result of the second send
>>>>> to see if it's giving you an error. And you may need to put
>>>>> in some condition variable to block simultaneous sends.
>>>>>
>>>>> All that said, TOSBase seems to be a bit of a
>>>>> hack-to-get-things-to-work so it might not be
>>>>> easy to modify....
>>>>>
>>>>> MS
>>>>>
>>>>>
>>>>> ram kishore wrote:
>>>>>>
>>>>>> Hi all,
>>>>>> I am using TOS1.1.10 .In the standard receiver application
>>>>>> TOSBase. I am trying to retransmit the message.I sent a message by
>>>>>> calling
>>>>>>
>>>>>> call RadioSend.send(gpTxMsg);.
>>>>>>
>>>>>> For this RadioSend.sendDone(TOS_MsgPtr Msg, result_t success)
>>>>>> event is generated.
>>>>>> Hoping that Msg is a pointer to the already transmitted
>>>>>> message,I call
>>>>>>
>>>>>> call RadioSend.send(Msg); to retransmit the same message again.
>>>>>>
>>>>>> But the message is not being re-transmitted .
>>>>>>
>>>>>> Can somebody tell me what is wrong or how to accomplish
>>>>>> retransmission?
>>>>>>
>>>>>> Regards,
>>>>>> Kishore
>>>>>> _______________________________________________
>>>>>> 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