[emstar-design] Socket interface to Emstar?

Lewis Girod girod@lecs.cs.ucla.edu
Wed, 8 Dec 2004 12:00:11 -0800


an example of connecting directly from java can be found here:

http://cvs.cens.ucla.edu/viewcvs/viewcvs.cgi/emstar/devel/java_bindings/MessageReader.java?rev=1.3&content-type=text/vnd.viewcvs-markup

the main downside of this approach is that you can't access the header
file that defines the packet header from java (as it is a C header) so
you have to manually extract the fields, which is also brittle in the
event that they changed.

a person at USC was looking into reporting the header as text that
could be parsed by java.. that seems ugly to me but it might be
another option.


On Wed, 8 Dec 2004 11:46:38 -0800, Ben L. Titzer <titzer@cs.ucla.edu> wrote:
> That sounds excellent. If that is the case, then our job is much
> easier! Kevin Chang and I will look into this.
> 
> Thank you,
> Ben
> 
> 
> 
> On Dec 8, 2004, at 11:43 AM, Lewis Girod wrote:
> 
> > if you can run avrora on the same machine as emstar, you don't need a
> > socket, you can just open the appropriate link device file directly.
> > you can do this from java using the "raw" file access provided (i
> > beleive) by fileinputstream.  each packet is a single read() or
> > write() to the open file.  the packet is preceded by a defned header
> > containing various information -- src/dst. etc.
> >
> > the link devices are named:
> >
> >     /dev/sim/groupXX/nodeYY/link/mote0/data
> >
> > where the group and node numbers correspond to the emstar
> > simulation/emulation you are running.
> >
> > since it involves writing less code, this might be the fastest path to
> > getting something running.
> >
> > otherwise, you would need to write a program that ran locally on the
> > emstar machine that accepted socket connections and sent/received
> > those messages to the appropriate link devices.  this would be a
> > normal sockets program, written in the language of your choice.
> >
> > lew
> >
> > On Wed, 8 Dec 2004 11:01:11 -0800, Ben L. Titzer <titzer@cs.ucla.edu>
> > wrote:
> >> Hello everyone,
> >>
> >> Following up on the discussion yesterday between Deborah's group and
> >> ours, I was wondering what facilities currently exist in Emstar for
> >> sending packets to/from a socket?
> >>
> >> For the first connectivity between Avrora and Emstar, I envision one
> >> node running in Avrora which is connected to Emstar via a socket so
> >> that radio packets going to/from the node on Avrora are sent across
> >> this socket.
> >>
> >> Any ideas? Suggestions?
> >>
> >> Thanks a lot,
> >> Ben Titzer
> >>
> >> ========================================================
> >> Opportunity is missed by most people because it is dressed in overalls
> >> and looks like work.
> >> -- Thomas Edison
> >>
> >> _______________________________________________
> >> emstar-design mailing list
> >> emstar-design@cens.ucla.edu
> >> http://www.cens.ucla.edu/mailman/listinfo/emstar-design
> >>
> > _______________________________________________
> > emstar-design mailing list
> > emstar-design@cens.ucla.edu
> > http://www.cens.ucla.edu/mailman/listinfo/emstar-design
> >
> ========================================================
> Every great advance in science has issued from a new audacity of
> imagination.
> --John Dewey
> 
>