Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Abstract messagin with runtime injection of concrete msg

The wizard doesn't follow this path and doesn't give option.

Why?

 

I don't want to have a fixed concrete msg before starting actore core

 

I want to inject my concrete msg in event handler

 

How to do that automatically?

0 Kudos
Message 1 of 7
(3,544 Views)

Can't you just make a message to set the concrete reply type?  The scripting automatically creates a method to set the concrete type.  It's like any other method.  You could just right click on it and make a message.  

 

If I understand your last post correctly, that should solve your problem.

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
Message 2 of 7
(3,530 Views)

@Ironman_ wrote:

The wizard doesn't follow this path and doesn't give option.

Why?


Because not everyone wants it.  My impression is that concrete binding is much more common.  I've only injected the concrete child on a few occasions, myself.

 

As Taggart says, make a message that targets the write accessor for the message implementation.

Message 3 of 7
(3,528 Views)

I like the script, but what if you want to send the same message BUT use different actions on the caller?

 

there is an example here in the forum (see my previous post), a sort of very detailed tutorial about abstract msg.

It creates "addition actor" and "multiply actor".

In the addition he uses injection, which is much superior solution, while keeping the same advantages

 

It's quite different because it puts the concrete message in another place (not like the script, that puts the concrete in caller's private data).

 

Also, can you tell me pls what is the meaning and usage of "reference method" ???? In the create abstract msg pop up. Can't find documentation.

0 Kudos
Message 4 of 7
(3,526 Views)

Look at my version.

 

This implementation is much more superior than the default outcome.

It's so easy to plug-in more behaviours in response to nested actor's reply.

 

The good news is that I can do it in minutes, all with script help.

 

The Taggar suggestion worked, it was enough to create another method adding the abstract method as input, then proceed with right click over it, actor framework, create message. In this way the caller actor can set the final behaviour faster, easier and ultimately more secure.

 

0 Kudos
Message 5 of 7
(3,522 Views)

You might be interested to know that all those scripting tools for making messages are open, ie. the block diagrams are unlocked and you can edit them.  It would be easy to fix.  Just take the code that creates the abstract message and then within that call the normal message scripting code with the accessor vi as the input and it will create your message for you.  

 

Checkout the following directories

  • [LabVIEW]\resource\Framework\Providers\MessageMakerProvider
  • [LabVIEW[\resource\Framework\Providers\MessageRescripter
  • [LabVIEW[\resource\Framework\Providers\LVClassLibrary

With those you will almost certainly have all the tools you need.

 

 

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
Message 6 of 7
(3,512 Views)

thanks.

 

to close to topic, can anyone explain what is the meaning of this option "reference method" in the create new abstract msg?

and the path to the method.

When should I use this?

 

abstract msg.jpg

0 Kudos
Message 7 of 7
(3,487 Views)