help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Threads and IPC


From: Paul Kienzle
Subject: Re: Threads and IPC
Date: Tue, 2 Nov 2004 07:34:35 -0500

Kalle,

I set up listen as an octave server which I've successfully used from
Tcl and I understand has been used from Java.  I have not tried to
write the corresponding octave client.

The octave-forge/main/parallel branch implements both client and server
sides in octave.  You might want to try that code instead if you want
to interaction amongst several interactive processes.

The Tcl client code is in octave-forge/extra/soctcl/octave.tcl.

The octave::open command uses Tcl's socket command to get a file handle.
It sets up an event handler to listen for activity on the handle,
then tells octave to send a value of 1 and waits for the result.
If 1 != 1, then it assumes there is an endian mismatch between
the machines.

The octave::eval command sends a command to octave.  octave::send
uses this to transfers data to octave as a string because it is
good enough for my purposes.

octave::Recv is the Tcl listener code.  It determines if octave
is sending binary data, a tcl command or an error.

The protocol is documented in listen.doc beside listen.cc on
octave-forge.

- Paul

On Nov 2, 2004, at 5:03 AM, Kalle August Raiskila wrote:


Hello

Is it possible to send messages to octave from other processes?
What I'd like to have is a "normal" octave terminal to which I could
send commands from an other program.

I looked into MPI, but if I understood correctly, it would need the
octave-process to "poll" for the MPI-message, hence the octave terminal
wouldn't be "in normal use".

I also looked at "listen" from octave-forge, but I couldn't understand
howto use it. Listen would propably be just what I'm looking for,
if I could fork it into an other thread (in octave). Is this possible?


Thanks in advance

Kalle Raiskila





-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------




-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]