Copyright © 2010, Michael J Eggertson
Author: Michael J Eggertson
LAVA Name: mje
Contact Info: Contact via PM on lavag.org
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.
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.
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.
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.
This code was downloaded from the LAVA Code Repository found at lavag.org