Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get an actor has how many messages and what names they are?

yanzhanglin_0-1686122828990.png

for example .this actor has 2 messages, named Method1 Msg.lvcalss and Method2 Msg.lvcalss,Is there a way to obtain them?

0 Kudos
Message 1 of 11
(3,358 Views)

You can use the property node App.AllLibslnAppInstance. I have attached an example of how to find child classes starting from a given parent class. You can easily adapt this to find message classes in a virtual message folder. You can even make your life easier by defining an intermediate class for each actor that inherits from Message.lvclass and changing the inheritance of your actor's messages. In this case, you can use the snippet without changes.

 

Message.lvclass <- 1. Class Msgs| <-  Msg1

                                                      | <-  Msg2 

 

Find Child Classes.png

0 Kudos
Message 2 of 11
(3,344 Views)

if I build exe,this methods seems to doesn't  work..

0 Kudos
Message 3 of 11
(3,328 Views)

Just put an object of all used classes in one vi, actor core for example. Than it should work.

0 Kudos
Message 4 of 11
(3,323 Views)

I'm not sure how you mean this to work in an EXE, but during this development, this utility is meant to do exactly what you're describing:

 

https://www.zyahsolutions.com/blog/bowzer-the-browser

 

https://www.vipm.io/package/zyah_solutions_lib_bowzer_the_browser/

CLA CLED AF Guild
0 Kudos
Message 5 of 11
(3,292 Views)

I should also note that because the utility recognizes and leverages interfaces, it works with projects built in LabVIEW 2020 and later.

CLA CLED AF Guild
0 Kudos
Message 6 of 11
(3,289 Views)

it seem to use Pre-Build Action VI can achieve my goal,I just want to konw what an actor can do,then I dynamic call message

0 Kudos
Message 7 of 11
(3,266 Views)

You want to dynamically determine an actor's API and then use that information to send those messages? What's a use case for this (I'm genuinely curious)? How do you plan on populating message classes that have inputs?

CLA CLED AF Guild
0 Kudos
Message 8 of 11
(3,249 Views)

I use string as every message‘s private data,these private data read from config files 

0 Kudos
Message 9 of 11
(3,237 Views)

Are you sure you should be using the Actor Framework?  Different frameworks make different design choices, and you seem to want to use complicated techniques to undo the choices the AF makes.  

0 Kudos
Message 10 of 11
(3,229 Views)