From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-16-2015 10:42 PM
Kinda funny I have to ask this... but I was looking for an example of launching a nested actor. I guess all the major examples that I have currently seen from NI use the Launch Actor method, where you get the actor's self queue by using the read caller. But that method has now been depricated and I haven't yet seen use of the root/nested launch. The root launch is easy, and much cleaner I think.
What I'm confused about is what to wire to the top left connector of the launch nested actor- just a class constant of the actor? That wouldn't seem right, because you almost want to use the "This" keyword, to get the actual instance of the actor that is running, not some constant. So perhaps there is a method that returns "this" actor. I'm sure that the simplest snippet of code or a pic would clear this up.
Thanks,
Rik
Solved! Go to Solution.
02-17-2015 01:01 AM
"This" actor is the Class ref of the actor (this is in a dynamic dspatch template VI of Controller Actor Class). I'm launching a nested actor called Background. The nice thing about nested actors is that I don't have to explicitly handle the stop of Background in Controller's stop core, it will be stopped automatically.
I hope this helps.
Danielle
02-17-2015 04:11 AM
I've been playing around with various simple examples of this. I think the attached code shows what you're looking for. The 'launch diagram' is also shown below.
Edit: Also, just to elaborate on your question: the top-left input terminal ("Caller Actor in") is the higher-level actor that is doing the launching. Then you just wire the class constant of the actor you want to launch to the "Nested Actor" terminal. See below for FlightSim App actor launching FlightSim UI actor.
02-17-2015 09:18 AM
Use File >> Create Project... and create either of the two Actor Framework projects. Those were both updated to use Launch Root Actor and Launch Nested Actor.
02-18-2015 12:42 AM
Thanks folks! I guess I had been using the 2013 version of Labview AQ, which hadn't updated them. I just hadn't been passing the reference in from the Message's Do vi into the Class's method that I was using.