05-12-2016 11:34 AM
See attached slides and sample code for today's Actor Framework user group meeting. I hope to see you there!
Following up...
Thanks to all who attended last night! For those who could not make it, I want to add some additional context to the post.
Challenge 1 shows a typical event-driven producer/consumer. The challenge is to rewrite (or adapt) this code into a single actor. No need to worry about nested actors, maintaining other actors' queue references, how to design and actor-oriented application, etc. Just make one. The legacy producer/consumer works almost exactly like an actor does, including equivalent subVIs for commonly overridden actor methods (Pre Launch Init, Actor Core, Handle Error) and also includes similarly equivalent message Send subVIs. I added plenty of comments to guide you through the transition to actor.
Key points:
Good luck and post questions if you have them!
Regards,
Ethan
05-13-2016 09:24 AM
How do you go about creating and .exe from the AF application's source code?
05-16-2016 08:08 AM
In a basic application, the startup VI is simply your launcher (the VI that launches root actor). If you want to be explicit about inclusion, you can add each actor and all of its messages to a library (.lvlib) and specify in the buildspec to always include all relevant libraries.
This is a good starting point for building your application. In reality, actors coupled by messages will include each other's libraries automatically. This will all change if you start using AF to build plugin architectures--but I wouldn't worry about that out of the gate.
05-16-2016 08:10 AM
Also, Robert Smith (of Bloomy, NJ) wrote a couple of nice blog posts on this topic: http://www.bloomy.com/support/blog/getting-started-actor-framework