Showing results for 
Search instead for 
Did you mean: 

Actor Framework Basic - The Message Class

Go to solution
I am using the Actor Framework Basic. I want to migrate the Queued Message Handler code to Actor Framework code, but I have a question. Let's imagine that we have in figure code, and I want to build a message for each of the cases that exists, but the parameters of each of the messages is different.
For example, let’s say I created a “Logger.lvclass” Actor. This actor can handle one message called “Log”. This takes a string input with the string to be logged. So if I created a Dynamic Dispatch for my “Logger” actor and create a message for that method. Now I can create a “CSV Logger.lvcass” that extends my Logger Actor and override “” with the CSV functionality. That means that when I launched a CSV Logger, anyone can send it a Log Messaged and it’d be logged to a CSV format. I could also create a “TXT Logger.lvclass” that extended my “Logger” Actor handled the Log message differently. (
I not be as there is to implement this code. Does anyone know an example that covers this situation? Can anyone attach a sample code? Can someone indicate a link to examples?
0 Kudos
Message 1 of 9

Good afternoon, I have a question about using Actor Framework. Deputy example, to better understand what I do. I have a parent class that inherits from the actor, and the various messages are defined for the class, in this case "Get". Now define a child class that inherits from the parent class. Whether messages that are to be used are the same as those of the parent class, you need to define all messages for the child class or the child class can inherit all messages? How I can do to make a child class run messages from a parent class, with references to the child class?



0 Kudos
Message 2 of 9

I'm not that familiar with the actor framework, but one of the best resources I found while learning it was here (at least, I think it was this):


It takes a sample application built using a QMH and shows you the various steps / progression moving it from a QMH to an LVOOP implementation all the way through to the Actor Framework.


It should help you see how you can adapt/modify your code to the actor framework.

LabVIEW Champion, CLA, CLED, CTD
Message 3 of 9

Thank you. The link has been helpful, but still have not managed to run the example. Deputy what I have done case anyone comes up with an idea.



0 Kudos
Message 4 of 9

hello gentlemen..

i was just stuck again and again with actor framework usage in labview.

here i try to pass the message of boolean and a numeric between parent and child but it not works anyone help me to solve this?

Certified LabVIEW Developer,
Project Engineer, HTIC IITM.
0 Kudos
Message 5 of 9
The code you attached is working as expected, Passing Boolean state from Parent to Child and Vice versa.
-Can you explain what is not working?
0 Kudos
Message 6 of 9

Yes but... Problem is the numeric value not received between parent and child???


Certified LabVIEW Developer,
Project Engineer, HTIC IITM.
0 Kudos
Message 7 of 9

@mohamedtanveej17 wrote:

Yes but... Problem is the numeric value not received between parent and child???


-You have to add first numeric control and indicator in same way as created for boolean control and indicator for both parent and child actors.

-Create new vi from static dispatch template and follow the same steps followed for Get State from Parent and Child methods.

-In parent inside event structure add new event for Numeric control and pass the value to the new method created.

Message 8 of 9
Accepted by topic author dgd.gomez



Firstly, just in case you haven't seen it, there is a subforum/group for Actor Framework questions - the people there are really helpful and the questions are all about Actor Framework problems. They also have some helpful materials stickied.


Secondly, what are you trying to do? I opened the example project you uploaded ( and took a look but didn't see anything as the obvious goal.


Regarding inheritance, child classes (not the same as nested actors) behave in the same way as with non-Actor Framework OOP code. That is, if you have a dynamic dispatch VI in the parent, you can override it in the child class to modify the behaviour of the VI. VIs in the parent (dynamic or static) can be used by the child, provided it has access to the VI (i.e. the VI is Public or Protected, or the child class is a friend of the parent class and the VI is Community scope.)


If the VI called is implemented by the parent (because it is static, or because you don't have an override, or because your override uses 'Call Parent Node') then the private data available should be that of the parent - if you have a child implementation called via dynamic dispatch, the child's private data will be available to the override (but not the parent, during a 'Call Parent Node' VI call).


Messages also have their own inheritance hierarchy, but in the simplest case, they inherit only from Actor Framework's 'Message' class. Typically, they are a class with private data, which might be empty, or contain the inputs to the VI that the '' calls, and two VIs, 'Send <MessageName>.vi' and ''. The is an override of the Actor Framework's '' and the parent does nothing here - what is important is that when an Actor receives the message, it calls the 'Do' VI of the Message that you define. Usually, this calls some public class VI (for example, 'Set Indicator' might be an example that could be called by Message). Here, you will also see that data is often unbundled from the Message class' private data, and used as an input for the public VI of the class that you sent the message to, via the enqueuer.



0 Kudos
Message 9 of 9