Mike Le Posted October 3, 2014 Report Share Posted October 3, 2014 The other day I was having trouble tracking down a hanging Actor. Debug Actor Framework let me shut them all down but it wouldn't tell me what Actor was still left hanging. That took a little more digging. I realized this was a problem I was running into a lot, so I decided to add some simple tracking code to our department's Parent Actor Template. Maybe this'll be useful to someone else, or give someone else some ideas. It's just something I whipped together quickly so it isn't thoroughly vetted or anything. Basically, it's a dialog that tells you (1) what Actors you've launched, (2) what Actors you've shut down, and (3) what Actors are still running. The tracker dialog is contained in a single VI, which is called in Pre-Launch Init and Stop Core overrides. The call is inside a conditional disable structure, with the condition "ACTORDEBUG==True". To enable the tracker, you set that conditional token in your Project Properties. I tried to keep the code simple and straightforward, it looks like this: The call to "Get LVOOP Name" is slow, but performance isn't a big concern for me as I only spin up a couple dozen Actors at once. The lvclass is attached, for 2012 and 2013. To use the tracker, change your actor inheritance to inherit from the Actor with Tracker class. Try it out and let me know what you think. The code depends on the OpenG toolkits. And I imagine a lot of other people have created their own versions of this and other handy debugging actor tools. I'd love to see what others in the community have come up with. Mike 1 Quote Link to comment
drjdpowell Posted October 3, 2014 Report Share Posted October 3, 2014 The call to "Get LVOOP Name" is slow,... Side comment: you’re using Property Nodes; relative to that, “Get LVOOP Name†is fast. Quote Link to comment
Mike Le Posted October 3, 2014 Author Report Share Posted October 3, 2014 (edited) Great point, drjdpowell! Thanks. After a little googling, I see that (as usual) someone else has thought of this and done a better job. http://lavag.org/topic/17056-monitoring-actors/ Edited October 3, 2014 by Mike Le 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.