[Prev][Next][Index][Thread]
help with DUIM application
What would be the correct way to use DUIM to create an application which
periodically (about 1 Hz) reads a sequence of data received via a serial
port and translates the data for display in a simple dialog window?
My first thoughts were:
1. Have two threads. One for the serial input task and one for the display
task. Assuming that to be the design, what is the proper way in DUIM to
signal the display task that new data is available for translation and
display. I know that DUIM has event queue processing, but I don't know how
it works. Would it make sense to define a new subclass of <event>, say
<io-ready-event>, and use it to signal from the serial input task to the
display task? The display task would, of course, somehow have to have a
modified event loop that recognizes the new class <io-ready-event>. The
event handling for the event in the display task would be to grab the data
from the input task and then translate and display it.
2. The other idea I had was to simply call the serial input function at a
rate of approximately once per second. Well, how do you accomplish timed
periodic events in DUIM? Or is there some other event in the Win32 API that
I could use?
I'm not an expert on either DUIM or Win32, so pardon if the answer is
obvious to the DUIM/Win32 experts.
Thanks for any help.
Follow-Ups: