03-21-2022 07:57 AM
Hello all,
i just learning AF, and i need to send abstract message from nested to caller.
It is easy to do when i have for example only one value as message.
But trouble for me is when i need to send a cluster with many indicators.
Then in event loop of caller i have big amount of unbundled indicators.
What i am searching for is more elegant solution, to get only one output - cluster, and not this.
If someone can advise how to proceed?
Thanks.
03-21-2022 10:16 AM - edited 03-21-2022 10:18 AM
@milan87 wrote:If someone can advise how to proceed?
For starters, give a kudo to these ideas:
Provide Access to Full Event Data in Event Structures - NI Community.
Allow-Dynamically-Registered-User-Events-to-preserve-...
Can't help you with AF though.
03-21-2022 11:27 AM
Yeah unfortunately this isn't an Actor Framework problem, it's a User Events one.
Try bundling the cluster into another cluster and see if that'll work.
03-21-2022 12:02 PM
@milan87 wrote:
Hello all,
i just learning AF, and i need to send abstract message from nested to caller.
It is easy to do when i have for example only one value as message.
But trouble for me is when i need to send a cluster with many indicators.
Then in event loop of caller i have big amount of unbundled indicators.
What i am searching for is more elegant solution, to get only one output - cluster, and not this.
If someone can advise how to proceed?
Thanks.
That is not an Actor Framework abstract message. That is a user event. An AF abstract message works just like a regular AF message.The main difference with the abstract message is that the Send is in the Nested Actor and the Do is in the Caller Actor. You have to tell the Nested Actor what message to use in the Caller Actor when you launch using the vi that's created when you build the Abstract message.
03-22-2022 02:35 AM
Hello All,
thanks for fast reply.
I'm aware that this is event structure problem...
That's why i trying to find solutions how to pass cluster from nested actor to caller actor.
To use abstract message somehow, to pass reference, or what to do?
I tried to pass reference of cluster via abstract message, abut this obviously doesn't work, because reference doesn't change value...
03-22-2022 06:34 AM
@milan87 wrote:
Hello All,
thanks for fast reply.
I'm aware that this is event structure problem...
That's why i trying to find solutions how to pass cluster from nested actor to caller actor.To use abstract message somehow, to pass reference, or what to do?
I tried to pass reference of cluster via abstract message, abut this obviously doesn't work, because reference doesn't change value...
Put the cluster in a cluster, and the event structure will return a cluster, not the individual elements.
Or, like AQ mentioned in the idea, use a class as a container.
I'm not sure if that is what you're after. Please clarify what you're looking for if it isn't.
03-22-2022 07:23 AM
@milan87 wrote:
Hello All,
thanks for fast reply.
I'm aware that this is event structure problem...
That's why i trying to find solutions how to pass cluster from nested actor to caller actor.To use abstract message somehow, to pass reference, or what to do?
I tried to pass reference of cluster via abstract message, abut this obviously doesn't work, because reference doesn't change value...
Use an abstract message to pass the data from the nested actor to the calling actor. In the calling actor you have options. You can pass the message to the helper loop from the method via a user event (like what I think that you're trying to do) and use a cluster in a cluster (or perhaps a variant) or you could use a value property node inside the method to write the data. Note that for the second method you need to have a reference to the control in the class private data and initialize it prior to receiving data.
03-23-2022 08:48 AM
Thanks all for the help.
I used cluster in a cluster, and seams that this is most elegant solution.
Abstract message is created and sent to a caller.
In caller, event is generated when abstract message is received.
Also message is connected to 'launch nested actor' and passed to enqueuer.
In 'do' VI looks everything ok, at least from my side...
But i have constantly error 1448, and program collapse.
Any idea what could be?
thanks
03-24-2022 03:41 AM
Hi All,
i found what was the issue.
Error 1448 was thrown, because i accidentally use 'read self encueuer' instead 'read caller enqueuer', while sending abstract message.
Thanks.
03-24-2022 05:29 AM
@milan87 wrote:
Hi All,
i found what was the issue.
Error 1448 was thrown, because i accidentally use 'read self encueuer' instead 'read caller enqueuer', while sending abstract message.
Thanks.
Glad to hear you solved that issue as well 😂.