comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: more difficulties in IDL - C++ combination
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: more difficulties in IDL - C++ combination [message #35346] Mon, 09 June 2003 04:44
Chris[1] is currently offline  Chris[1]
Messages: 23
Registered: January 2003
Junior Member
Hi Juan;

We use pipes regularly to link IDL and C language functions in UNIX/Linux
(It's a headache in Windoze..). I simply modify the C language functions so
that they can take their I/O through named pipes, and then read/write them
through normal file operations in IDL. To keep the IDL function running
independently of the C function, just make sure you spawn the C language
function in the background, and that you have the communication protocol
between the processes worked out. This method to spread large IDL processes
out over multiple CPU's (by breaking it into a number of smaller processes
that communicate via pipes) it works pretty efficiently.

You could also look at socket programming, which is a little more direct &
generic and has some hope of working on MS systems. I avoid it because I
don't ever want any of the people I work for thinking I might enjoy working
on a Bill Gates product :)

Cheers;

Chris
Re: more difficulties in IDL - C++ combination [message #35348 is a reply to message #35346] Sat, 07 June 2003 22:49 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Juan Luis Medina Trujillo" wrote in message ...

> Im starting to know more about IDL, but then Ive been thinking in the
> main architecture of the complex program I have to implement and I need
> pipes between IDL and C++. In the top of the software and the only thing
> the scientists (astrophysics) will see will be a GUI (widget in IDL)
> made preliminarily in IDL and able to perform many scientific functions.
> This IDL process will be using the pipes to hear from C and to send
> commands, this means that once the C program is launched from IDL, IDL
> should continue iterating between pipes and waiting also for user
> requirements.
>
> I dont know if I made myself clear, does anybody know if this is
> feasible using IDL - C combination?? does IDL get halted when the C
> function is launched?? how does it work?

Calling a DLM function is like calling any other IDL function, program
execution is halted until the function returns. This doesn't mean you are
stuck though. You can send events back to IDL thru the widget interface.
It is rather limited in that you only can send back a single long value (I
think) but it is sufficient to notify your IDL process that something has
happened on the C side. From this point on I am making all of this up but
you could call a DLM function which launches your C++ code in a separate
thread and communicate "events" via IDL's widget interface and another set
of DLM functions could be called in response to these events. I can
elaborate if desired.


> In case it is not possible, maybe a solution is to run both programs
> independently and IDL would connect with the program in C++ (dont know
> how) iteratively while running the widget.

This is certainly possible. Reimar's post might get you started. ALso, the
socket functions or shared memory functions (5.6+) might be useful.


Good Luck!

-Rick
Re: more difficulties in IDL - C++ combination [message #35350 is a reply to message #35348] Sat, 07 June 2003 00:25 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Juan Luis Medina Trujillo wrote:

> Hi again,
>
> Im starting to know more about IDL, but then Ive been thinking in the
> main architecture of the complex program I have to implement and I need
> pipes between IDL and C++. In the top of the software and the only thing
> the scientists (astrophysics) will see will be a GUI (widget in IDL)
> made preliminarily in IDL and able to perform many scientific functions.
> This IDL process will be using the pipes to hear from C and to send
> commands, this means that once the C program is launched from IDL, IDL
> should continue iterating between pipes and waiting also for user
> requirements.
>
> I dont know if I made myself clear, does anybody know if this is
> feasible using IDL - C combination?? does IDL get halted when the C
> function is launched?? how does it work?
>
> In case it is not possible, maybe a solution is to run both programs
> independently and IDL would connect with the program in C++ (dont know
> how) iteratively while running the widget.
>
> Any suggestions? Im putting it difficult eh?

One could help better just for information.
At FZ Juelich ZAM there is a client / server library in preparation
"the visit project" which will do all this complex data exchange.
Marlene Busch writes at the moment the idl interface to this library.
An alpha version should be available soon or is already available.

http://www.fz-juelich.de/zam/visit/

best regards

Reimar


>
> Thanks in advance, its very comforting to have a place where you can
> send your problems and get useful ideas from it.
>
> Juan Luis

--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: help with gaussfit
Next Topic: Re: help with gaussfit

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 06:29:14 PDT 2025

Total time taken to generate the page: 0.32443 seconds