mje Posted March 19, 2010 Report Share Posted March 19, 2010 Name: MessagePump Submitter: mje Submitted: 19 Mar 2010 File Updated: 21 Jun 2010 Category: LabVIEW OOP Version: 1.1.4 LabVIEW Version: 2009 License Type: BSD (Most common) MessagePump v1.1.4 Copyright © 2010, Michael J Eggertson Author: Michael J Eggertson LAVA Name: mje Contact Info: Contact via PM on lavag.org LabVIEW Versions: 2009 SP1 Dependencies: None Description: Provides a object oriented implementation of a message pump in LabVIEW. Message pumps are also commonly referred to as a message loops, event loops, or message dispatchers in other programming languages. In terms of traditional LabVIEW design paradigms, a message pump would be considered the consumer portion of many kinds of producer-consumer based architectures. Installation and instructions: Extract the attached zip file to a convenient location. The included lvproj file contains four examples that should give a good indication of how to get started using the MessagePump and supporting classes. Using the MessagePump in your own projects will usually only require you to add the class to the project. Examples: Four examples are included. Basic Message Pump demonstrates a minimal implementation that defines a class which overrides only a single VI and provides a VI which uses the class. Parameters extends the previous example and demonstrates how parameters can be passed to and from a MessagePump. Progress Dialog demonstrates how a MessagePump might implement a user interface. Callbacks is an advanced example which demonstrates how one might implement a Callback. Known Issues:NoneAcknowledgements:This is a simple LabVIEW implementation of an architecture which has been around for quite some time...Version History:v1.0.0: Initial release of the code, posted but never submitted to the CR.v1.1.0: Inital lava.org CR submission.v1.1.2: Added a fourth example demonstrating the use of Callbacks.v1.1.4: Fixed a bug related to locking the MessagePump, StartLoop will now return an error 123 if the MessagePump is already in use.License: Copyright © 2010, Michael J EggertsonRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Support: If you have any problems with this code or want to suggest features: please go to lavag.org and Navigate to LAVA > Resources > Code Repository (Certified) and search for the "MessagePump" support page. Distribution: This code was downloaded from the LAVA Code Repository found at lavag.org Click here to download this file Quote Link to comment
Mark Balla Posted March 24, 2010 Report Share Posted March 24, 2010 Approved 3-23-2010 Quote Link to comment
mje Posted April 16, 2010 Author Report Share Posted April 16, 2010 I've updated the submission to include a fourth example demonstrating the use of Callbacks. There code for the core classes has not changed, they are identical to the 1.1.0 release. -m Quote Link to comment
mje Posted June 21, 2010 Author Report Share Posted June 21, 2010 (edited) For those keeping track, version 1.1.4 is a minor update: Fixed a bug in MessagePump::LockQueue.vi, which resulted in no error being returned if the lock operation timed out and the default error code was used (0). By default, error 123 will now be returned on a time out. This fix ultimately affects MessagePump::StartPump.vi which will now properly return error 123 if it is called on a MessagePump which is already in use. Removed an unnecessary case structure in Callback::DoCallback.vi -m Edited June 21, 2010 by mje Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.