Jump to content

[CR] Data Broadcasting Library for Actor Framework


Recommended Posts

index.php?app=downloads&module=display&section=screenshot&id=228

Name: Data Broadcasting Library for Actor Framework

Submitter: Stobber

Submitted: 01 Apr 2013

Category: *Uncertified*

LabVIEW Version: Not Applicable

License Type: BSD (Most common)

Use v1.0.0 for LabVIEW 2011-2012.

Use v1.1.0 for LabVIEW 2013+.

 

The attached library provides extensions to the Actor Framework to facilitate the broadcast of messages from one actor to several others. Listeners subscribe to a message when they want to receive it from the Broadcaster, and they unsubscribe when they want to stop receiving it. The library provides a set of common interfaces that decouple Broadcasters from Listeners so any two actors in a messaging hierarchy can communicate via broadcast without having the same caller.

 

This library extends the Actor Framework; it does not modify the core framework in any way, so it may be used in existing projects as well as new ones.

 

Documentation for the library and the included example program is attached.

Click here to download this file

Link to comment

Thank you for this. Since I'm working on template projects, I used your code firstly to improve my understanding of top-level actor launching and of Actor Core.vi.

 

When the Event Structure's while loop ends, Actor Core's parent might still be running (if the developer makes a mistake and does something other than sending messages to self - see image below). This prevents Last Ack, which hangs the app launcher. Is it "clean" to fix this by sending Stop after the while loop?

 

post-107-0-68627300-1365036582_thumb.png

Link to comment

Sorry Todd, for some reason I didn't receive notification when you posted your comment. Yes, it should be "clean" to do this since you're ignoring the error out from Send Stop. It looks analagous to firing the "Shutdown" event in Stop Core.vi to make sure the event handler exits when the message handler is stopped.

 

Frankly, I've had trouble figuring out all the corner cases for shutting down an actor that gets itself into an error state. Its two-headed nature (message handler and AC.vi override) makes that a tough problem to solve, especially since every actor is unique.

Edited by Stobber
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.