Re: external process driving perfly
AnitaKishore (kishore++at++electrogig.com)
Fri, 25 Aug 1995 11:59:49 -0700
On Aug 25, 11:13am, Carlo L. Tiana wrote:
> Subject: external process driving perfly
>
> This is probably not a direct Performer question, though I am sure many
> people must have tried this. I have written a simple perfly-like app,
> where I update the XYZHPR coordinated via mouse (Xformer). I would like
> now to control these coordinates from an external process. What I would
> like to do would be to have my app startup, allocate a global structure
> containing the 'pfCoord view;' and then somehow startup another process
> (called, say, 'driver'), and communicate to it the address fo that
> structure, so 'driver' can write values to view, to be read at every frame
> by my flying app... you get the idea.
>
> Are there preferred mechanism to do this within Performer? If not, what is
> the simplest call that will make this happen? Something like sproc() or
> maybe system()?
>
> Any help would be appreciated!
> Thanks a lot,
> Carlo.
>
>-- End of excerpt from Carlo L. Tiana
Yes, forking off your own process and establishing shared memory for IPC
is the solution that I know of. Performer has a nice API for managing
shared memory - the data pool concept (look at the mannual). In fact even
when you are using mouse for input, the pfuInitInput function forks a process
to handle input devices like mouse, keyboard etc. You can fork the new process
from the APP process but make sure that you don't use certain Performer API
calls from within it (see that mannual for details).
-anita
----------------------------------------------------------------------------
Anita Kishore
kishore++at++electrogig.com
----------------------------------------------------------------------------
This archive was generated by hypermail 2.0b2
on Mon Aug 10 1998 - 17:51:50 PDT