From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Where to start AF project?

Solved!
Go to solution

I've been spending a lot of spare time trying to learn more about AF and get a better understanding of it. I've followed a few tutorials and have made a few small little projects and definitely have a better handle on how everything works. For a larger project though, how do you pick where to start? I have this QMH project with about 20-30 states in the message handler, and wanted to try and rebuild it as an AF structure. I'm sort of at a loss of where to begin. I know that I should probably have a "Test Actor" as a parent/template for each test, I was thinking the GUI would certainly be an actor, and that there would be an Actor to handle the test results and reporting, maybe an actor for interfacing between the measurement instruments, but what should my overall parent actor be that everything inherits from to tie them all together? Should I just be using the GUI as the actor that everything else inherits from? sort of like the QMH is in the Main.VI (GUI) of the QMH project? Should I just make each actor and leave the Actor Framework.lvlib as the topmost actor (I know it will be anyway)?

0 Kudos
Message 1 of 3
(1,703 Views)

Do you try Actor Framework Template? This template can answer all your question

0 Kudos
Message 2 of 3
(1,675 Views)
Solution
Accepted by topic author TheWolfmansBrother

This is a really hard decision when you starting a AF project for the first time.

 

But I would advise you, start separating your actors (classes) for each task (Responsibility). For example: one logs, one performs some calculation, one is UI, one acquires data, and so on.

Your root actor could or could not be one of the above, it will always depends on the overall performance and the decoupling needs.

 

Your first attempt won't be perfect, nor the second one, and might never be perfect, but if you can create an actor that can be used in two different projects, that would be already a success.

 

Just start it.

Message 3 of 3
(1,643 Views)