Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Questions about AF , QMH, StateMachines

If you understood Olli's post he's basically saying that the state pattern changes the actor object in the shift register (as you transition one state to another).  That is what provides the dynamic dispatch which replaces the old conditional logic.  The response to any given message depends on what state the actor is in (ie. which child class is loaded into the shift register).

 

Hopefully that is clear.  It sounds like that is what you want to do.  You can certainly use a helper loop, but I think the state pattern actor is a more elegant solution if you can wrap your head around it.

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 11 of 14
(929 Views)

yes, I got state pattern, I downloaded and will try to use it.

 

I am trying to use also other "application" of AF, for example to make a publish-subscribe and "central actor", where the hierarchy is kinda broken (you end up passing around the enqueuers).

 

 

0 Kudos
Message 12 of 14
(926 Views)

@Taggart wrote:

If you understood Olli's post he's basically saying that the state pattern changes the actor object in the shift register (as you transition one state to another).  


To be more exact: there is no shift register. 

 

You have an Actor representing an abstract state (Context Actor). The concrete states are child classes of this Actor. So each time, you change states, Actor Core.vi of the current state object is kinda ripped out and replaced by Actor Core.vi of the new state.

0 Kudos
Message 13 of 14
(923 Views)

WOW

 

I found so valuable pptx and videos on the NI WEEK 2018 section

 

go here

 

https://learn.ni.com/center-of-excellence

 

so much value

Message 14 of 14
(911 Views)