Re: PV-Wave Interapplication Communication Question [message #18232] |
Wed, 08 December 1999 00:00 |
Mark D. Williams
Messages: 15 Registered: November 1999
|
Junior Member |
|
|
Adrian Clark wrote:
>
> Dear All,
>
> I've written a number of C programs, each of which calls PV-Wave, performs
> some calculations, calls some PV-Wave routines etc, and then returns.
>
> They work fine in isolation, with each opening a separate PV-Wave session,
> running the commands then exiting. However, I wish to link all these
> programs together and operate in a single PV-Wave session. i.e. to have
> the first module open the PV-Wave session, and all subsequent modules to
> connect to that session and do their calculation, rather than opening a new
> session for each one. Has anybody any suggestions as to how to connect to
> an already open PV-Wave session in a new process - i.e. a process other
> than the one that opened the session in the first place?
You have two options here (if you are on a UNIX platform). The first
option, available only on UNIX is to use PV-WAVE's RPC (Remote Procedure
Call) API, and its associated functions, to interface with PV-WAVE.
Your first C program could start up PV-WAVE, and then call the PV-WAVE
UNIX_LISTEN function, which will listen and respond to RPC requests.
I believe there are examples of this in $VNI_DIR/demo/interapp.
The second, and possibly more straightforward, method, would be to
use the new Sockets OPI module, which is available as of PV-WAVE version
7.0. Using the Sockets OPI, you can communicate with PV-WAVE via the
standard TCP/IP sockets API, and this option works on both UNIX and
Windows NT platforms.
Regards,
Mark Williams
Resource Engineering, Inc.
|
|
|