[Tinyos-help] help:event Receive.receive(),simultaneous!!
Aditya Bhave
adityay.bhave at gmail.com
Thu Jul 6 01:51:45 PDT 2006
I dont think you can.Packet loss is a problem in all networks-wired or
wireless.
What you can do is reduce the rate at which the sending node injects packets
into the network. For example suppose node 1 wants to send 2 messages in
succession. After sending the first message, wait for a period of time say
500 ms (sufficient for the packet to actualy eave the sending node and
possibly reach other nodes). On timer firing, send the second message.
Another way to solve the problem is to let your application return the
receive buffer back to TinyOS as soon as possible
event TOS_MsgPtr ReceiveMsg.receive(TOS_MsgPtr m)
{
//extract the payload field and copy to local storage space
// post a task to process the payload
return m;
}
In this way, if your storage space is quite big (capable of holding say 5
packets), you increase the probability of allowing TinyOS to receive each
message properly and your application program to not miss them.
On 7/6/06, Munaretto, Daniel <munaretto at docomolab-euro.com> wrote:
>
>
>
> Hi all,
> is there a fast and easy way to receive all messages arriving
> from the network without lossing packets (simultaneous arriving messages to
> the same node)?
> Because if i only use
>
> event TOS_MsgPtr ReceiveDataNC.receive(TOS_MsgPtr m){
> Datagram *dg=(Datagram *)m->data;
> [..]
> .
> .
> [..]
> return m;
> }
>
> i see in TOSSIM that some packets too close with each other (i
> mean in the time,really closed in arriving time), only the first is taken
> and elaborated,the next ones are not considered.
> But i want to consider all these packets for my project, it's
> really important!!!
>
> I hope someone can help me!
> Thanks for your availability!!
>
> Cheers
> Daniele
>
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
--
regards,
Aditya Bhave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20060706/7dadd58e/attachment.html
More information about the Tinyos-help
mailing list