It's been a long time since I last did anything in TinyOS 1.x. The
TOS_Msg structure has an element called "ack" (of type uint8_t). Maybe
this is a boolean that will be set to something different from 0 if an
ack has been received? In TinyOS 2.x sendDone is only called once an Ack
has been received or the timeout has expired. If this is also the
behavior of TinyOS 1.x, then you could check the ack field in the
sendDone function:
event result_t sendDone(TOS_MsgPtr msg, result_t success) {
if(!success || msg->ack == 0) {
// post retransmission job
} else {
// post job to send next message
}
}
Again, it's too long that I last did anything with TinyOS 1.x, so no
guarantee that this actually works.
Cheers,
Urs
On 12/4/10 1:48 PM, lucky eyes wrote:
>
> Thanks for reply
> In Tinyos 1.x there are only 2 commands in MacControl interface
>
> 1.enableAck() and 2. disableAck()
>
> I think wasAck() will be in tinyos 2.0.I want to know how to retransmit
> in tinyos 1.x when false is received in message->ack
>
> A.Q.Ansari
>
>
> > Date: Sat, 4 Dec 2010 10:19:38 +0100
> > From: [email protected] <mailto:[email protected]>
> > To: [email protected]
> > Subject: Re: [Tinyos-help] Retransmit
> >
> > The interface offers a command wasAcked, that tells you if the ack was
> > received. If the return is false you can/ have to resubmit your message.
> >
> > Quoting lucky eyes <[email protected]>:
> >
> > >
> > >
> > > Hi,
> > >
> > > I am using Tinyos 1.x and I have successfully enabled acknowledge
> > > using MacControl.enableAck() but can anybody tell me how to
>
> > > retransmit a message if sent message is not acknowledged
> > >
> > > A.Q.Ansari
> >
> >
> >
>
>
>
> _______________________________________________
> 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