Jump to content


Photo
- - - - -

LabVIEW.Messaging.2.0


  • Please log in to reply
2 replies to this topic

#1 mje

mje

    The 500 club

  • Premium Member
  • 813 posts
  • Location:Milford MA USA
  • Version:LabVIEW 2011
  • Since:1997

Posted 15 August 2010 - 03:39 AM

I'm working on a new re-use library which I hope to have in a semi-complete state within the next month. It will ultimately contain much of what was discussed in another thread, but I figured I would post what I have to date, mostly because all the discussions with people at NIWeek have recently got me pretty excited about the advanced OOP based frameworks that are being worked on. I figured I'd throw mine into the fray for comments as well.

It has what I hope to be the next version of my MessagePump framework, and some supporting classes (Callback, and descendants). For the uninitiated, message pumps go by other names such as message loops, event loops, or message dispatchers in other languages. In more traditional LabVIEW lingo, you could recognize a message pump as a consumer portion of many producer-consumer based architectures.

I'll point out that there are some completely unimplemented classes in the attachment as well, this is literally an export from the current (incomplete) source code I'm working off of.

If you download the current snapshot, you'll find a project file in the root directory, or you can browse right to the examples folder if you'd like.

This code is entirely pre-release and not complete. Please do not redistribute it.

Of note:

The MessagePump is now entirely a by reference class. The public interface handles only DVRs, and does I think a decent job of defining an overridable interface which by necessity must be by value (and is not public).

As before I've gone through and made some fairly verbose examples, I think they do a good job demonstrating the fundamental use cases for the class.

Speaking of examples, I dislike #2...It's too much too soon and I need to find a better demo case for callbacks. For now though, it's what's we got.

If you recall the original MessagePump, you'll notice the pump is now entirely FIFO based (no more posting to the front of the queue), and there are absolutely no built in synchronous posting methods. This was a conscious decision.

Finally, unlike the first version which I had been using for about a year before submitting it to LAVA, this version is entirely new and hasn't really been put through it's paces. So if you see something that doesn't seem right, say something...it probably isn't!

Note the code is 2010 only. I don't think it can be saved for previous versions as it uses some of the newer features.

Attached File  LabVIEW.Messaging.2.0-PR01.zip   771.42K   254 downloads
Have fun,
-Michael

#2 huotom

huotom

    More Active

  • Members
  • PipPip
  • 46 posts
  • Version:LabVIEW 2010
  • Since:2008

Posted 17 August 2010 - 12:53 AM

I like it. And I can see the power of OOP.Posted Image

#3 mje

mje

    The 500 club

  • Premium Member
  • 813 posts
  • Location:Milford MA USA
  • Version:LabVIEW 2011
  • Since:1997

Posted 26 August 2011 - 05:21 PM

As this is being referred to in another thread, I'm updating the library to a more recent version 2.1. The library now requires LV2011.

Attached File  LabVIEW.Messaging.2.1-r1423-LV2011.zip   3.17MB   163 downloads