The Open AF Payload Method Utility

What You See Isn’t What You Get

When writing code using NI’s Actor Framework, the way you communicate between actors is by way of message classes. Each AF message class has a “Send” method which collects the inputs for the message and transports it using another actor’s enqueuer, but the “Send” method (which is often what you see on the block diagram) is not what gets executed by the actor that receives the message. The actual logic that executes when the message is received resides in what we call a message’s “payload method” which is a member of the receiving actor’s class (or an ancestor of that actor).

Too Many Clicks

In order to get from a message’s “Send” method (what you see on the block diagram) to the actual payload method’s block diagram (where the true business logic your message resides) takes no fewer than 5 different actions:

  1. Double-click to open the “Send” method’s front panel.

  2. Locate that VI in the LabVIEW project by pressing “Ctrl+Shift+E”.

  3. Double-click the “Do” VI in that same message class.

  4. Navigate to the block diagram of “Do.vi”.

  5. Open the payload method by double-clicking it (pressing Ctrl at the same time takes you directly to the block diagram).

In our opinion, this is way too many clicks, takes way too much time and leaves way too many unnecessary windows open. There should instead be a way to go directly from a message’s “Send” method to the payload method’s block diagram.

Introducing the “Zyah Open AF Payload Method” Utility

Installing the Zyah Open AF Payload Method VIP adds the following right-click menu option to “Send” methods on the block diagram.

Selecting this menu item will open that message’s payload method directly (or a selection window if it’s a dynamic dispatch VI). Enjoy those saved clicks!

Previous
Previous

Bowzer the Browser

Next
Next

The AF Msg Constructor Utility