Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Use Self-Addressed Message to Create a Synchronous Enqueue?

So I posted this on the LV board to give some background on the issue:

https://forums.ni.com/t5/LabVIEW/Try-to-Use-Self-Addressed-Message-to-Create-Synchronous-Message/m-p...

 

To add to it, I was looking for a way to take a single message class, enqueue it to an actor, have the actor do some stuff, then a send a response back using the same message class so that I didn't have to create a second related class representing the response to my message.  Additionally I didn't want to use the Reply Msg class as that relies on variant conversions.

 

I tried to do that as described in the original post but it didn't work, I'm thinking because I was trying to self-address a child of the self-addressed message class and so maybe there was some sort of inheritance issue occurring that was forcing a default class value at some point during execution which wasn't clear during edit time and only manifested when running.

 

I've since just created my own synchronous message child class which accomplishes what I want but it would still be useful to get some clarity on why this didn't work.



I saw my father do some work on a car once as a kid and I asked him "How did you know how to do that?" He responded "I didn't, I had to figure it out."
0 Kudos
Message 1 of 2
(2,637 Views)

Hi,

 

I would suggest taking a look at this forum post.

It goes over how to send synchronous messages and wait for a response: https://forums.ni.com/t5/Actor-Framework-Discussions/Send-Message-And-Wait-For-Response/td-p/3426184

 

There is even a video that walks you through the process.

 

Good luck!

T. Le
Vision Product Support Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,605 Views)