[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua module wrapping the Windows COMM port API
- From: Ross Berteig <Ross@...>
- Date: Tue, 23 Sep 2008 13:38:24 -0700
Sometime on 22 Sep 2008, "Xu Wang" <email@example.com> wrote:
>Please send me a copy too.
>2008/6/23 Asko Kauppi <firstname.lastname@example.org>
>> For a ported serial module, see:
I'll take this as a reminder that I promised to produce a clean
wrapping of the COMM API last Summer. Since it is now officially
Fall, I should probably try to finish that up and publish it. ;-)
When I got distracted by helping Asko test his new release of
Lanes on XP, I was looking for a framework to verify that the
serial API was easy to use in a threaded environment as an
alternative to diving into proper support for Windows Overlapped
Unfortunately, testing of my wrapper was showing that it wasn't
as practical as I expected to use very short (or zero length)
timeouts and polling as a means of handling bi-directional
communications in a single thread. My intent is to demonstrate
that Lanes will allow use of blocking I/O in worker threads that
communicate with program logic and/or UI in a third thread via
FIFOs implemented by Lindas provided by Lanes.
An unexpected result of this is that I have a recipe (that I also
need to publish "soon") for integrating Lanes with IUP so that
worker threads can communicate with the UI. This can be done with
no changes to either Lanes or IUP by using an IUP Timer control
to poll a Linda, but I still would like to integrate Lindas into
the IUP event model more completely which will require writing a
glue module and taking care of some platform portability issues.
I've also learned more than I want to know about getting MinGW to
build DLLs compatible with LuaBinaries and Lua for Windows....
Ross Berteig Ross@CheshireEng.com
Cheshire Engineering Corp. http://www.CheshireEng.com/