home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / windows / x / 21055 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  2.2 KB

  1. Path: sparky!uunet!news.univie.ac.at!alijku11!jsixt
  2. Message-ID: <19930112.175505208029.NETNEWS@ALIJKU11>
  3. Date: Tue, 12 Jan 1993 17:55:05 CET
  4. Newsgroups: comp.windows.x
  5. From: jsixt@risc.uni-linz.ac.at (Johannes Sixt)
  6. Distribution: world
  7. References: <1993Jan11.150749.17020@lambda.msfc.nasa.gov> <1993Jan11.172359.9320@ods.com>
  8. Organization: RISC, J.K. University of Linz, Austria
  9. Subject: Re: timers
  10. Nntp-Posting-Host: 193.170.36.100
  11. Lines: 39
  12.  
  13. In article <1993Jan11.172359.9320@ods.com>, chris@ods.com (Chris Atkins) writes:
  14. > Gary Lasseter (lasseter@lambda.msfc.nasa.gov) wrote:
  15. >
  16. > : I'm working on a real-time telemetry display application supporting NASA/MSFC.  I'm looking for information regarding the most
  17. >
  18.  
  19. I do not know what this is. Let's assume it's some sort of animation. I.e.
  20. graphics output is necessary.
  21. >
  22. > Gary,
  23. >   You are correct about the Xt timers not being extremely accurate.  I believe
  24. > the correct questions are:
  25. > 1)How can you get accurate timers in a non realtime environment(I assume you arerunning in a unix environment)?  You can't.
  26. > 2)Assuming you could find a solution to 1, how can you get this to work in the
  27. > Xt environment?
  28.  
  29. Try the following:
  30. Seperate your program into 2 programs, one for managing the graphical user
  31. interface (using Xt/Motif), the other does the accurate timing and the animation.
  32.  
  33. More accurately:
  34.      1. When the GUI starts up it realizes a large Widget of some class
  35.     (DrawingArea or Core, for example) where the graphics shall go. It
  36.     puts the XID of its window in some root window property, which can be
  37.     fetched by other applications.
  38.  
  39.      2. Then the GUI forks, execing the animation program. The animation
  40.     program opens a display connection and fetches the XID of the window
  41.     which it shall paint to from the root window property.
  42.  
  43. Communication between the programs can be done with pipes, XtAppAddInput() (in the
  44. GUI), and select() (in the animation program). Of course, you can tell the XID
  45. of the drawing window to the animation program through these pipes.
  46.  
  47. If the thing you mention is some sort of real time control it gets easier because
  48. you need not tell the XID of the window to the control program but you only need
  49. the communications part. You still do forking and execing.
  50.  
  51. -- Hannes
  52.