[Tinyos Core WG] Fwd: Other tinyos java stuff

David Gay dgay42 at gmail.com
Fri May 18 13:05:56 PDT 2007


---------- Forwarded message ----------
From: David Gay <dgay42 at gmail.com>
Date: May 18, 2007 1:04 PM
Subject: Re: Other tinyos java stuff
To: David Moss <dmm at rincon.com>
Cc: Philip Levis <pal at cs.stanford.edu>


On 5/18/07, David Moss <dmm at rincon.com> wrote:
> Now that I've been going through the Java serial forwarder again, I realize
> I should probably provide the updates I've made on the java side to
> automatically retry sending packets a few times if the ack from the mote
> fails.  This fix has been a successful work-around for us for the tmote
> serial stack dropped packet issue, and will probably help out some other
> people as well.

Sounds like a good idea.

> Finally, we talked a long time ago about switching up the MessageListener
> interface from:
>
>   public void messageReceived(int to, Message m);
>
> to something like:
>
>   public void messageReceived(SerialPacket rawPacket, Message m);
>
>  The point being that having direct access to the SerialPacket itself lets
> you find out all sorts of information about the message that you currently
> don't have access to.  I'm hesitant to go at it without everyone's
> understanding of what it will involve.  It's an easy update, but will affect
> quite a few .java files – any application that uses the MessageListener
> interface (which is pretty much every application).   I guess if we agree
> that it should happen, the next question is when.  What are your thoughts?

Could we just add a getRawPacket method to Message instead? After 30s thought:
- advantage: interface doesn't change
- advantage: most apps don't care about the raw packet
- problem: need to pass in the raw packet when creating messages
- problem: there's a *lot* of Message constructors to change...
  could have setRawPacket instead
- problem: what does this mean for Message's built out of sub-parts of
packets? (actually this may be an issue for David M's proposal too?)

David


More information about the Tinyos-2.0wg mailing list