Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending messages to AF launched by another vi

Hi,

I did a project to practise AF and I have some questions.

How to send message to Actor Framework from one application if another application launched this Actor? I used Functional Global with Caller-To-Actor Enqueue.ctl, but I'm not sure that it's good idea.

And, what is connected with previous question, how to check if Actor was launched? I used Send and Wait for Response - sending empty message and checking the Error, but it's rather a trick.

I enclose my project - ATM is the application which sends messages to Server (Actor launched in Run Server.vi and executing independently).

If it's not clear please let me know

Ola

0 Kudos
Message 1 of 3
(2,937 Views)

General answer is "You don't do message arbitrary actors because it breaks the encapsulation." For specific cases where the remote actor really is serving as a port listener, refer to the implementation of Actors on RT targets for an example of doing this. The basic summary of that example is that you have one nested actor whose Actor Core.vi listens to the network port (through whatever communications magic you prefer to use, we like Network Streams) and generates messages for itself or its caller based on the actions of the network connection.

Message 2 of 3
(2,257 Views)

It seems to make sense Thank you

0 Kudos
Message 3 of 3
(2,257 Views)