[Tinyos-help] Sending Multiple Messages with SendMsg
tsiatsis at ee.ucla.edu
Sun Sep 11 16:27:45 PDT 2005
Now efficincy depends on what you want.
If you want energy efficiency (as few transmissions as possible) then why
don't you send the packet once (say with a Broadcast dest address) and
have a list of intended
recipients in the data portion of the packet? In that way you can do your
filtering in the receive() function of your application.
In that way you save N-1 message transmissions and receptions, where N is
the number of neighbors.
If you care about reliable delivery to each neighbor that might not get a
packet due to a hidden terminal problem then you should use another scheme
for the neigghbors to return the ACKs to the transmiting node. If you
don't want to write your own ACK scheme you can enable the exisiting radio
layer ACKs and use the send() and sendDone() command/event pair: every
call to the send() command is followed by a sendDone() when the packet is
transmitted (and I think after it is ACKed by I may be wrong). So you
initiate a packet transfer with only one send() and you schedule the rest
of the transmissions in the sendDone() event by posting a task to send the
packet to the next neighbor.
I hope this helps,
On Sun, 11 Sep 2005, Brett Parsons wrote:
> Hi All,
> I have a situation where a node needs to unicast a message to multiple
> neighbours. In a simplistic view, it looks like:
> for( i=0 ; i < num_neighbours ; i++)
> call SendMsg.send(....) ;
> I know there must be a better way of doing this (perhaps using something
> provided by TinyOS). Can anyone offer advice on the best way to unicast
> messages to multple neighbours in an efficient manner?
> Brett P
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
More information about the Tinyos-help