Jump to content

the difference between the dynamic dispatch and static dispatch?


Recommended Posts

  • 5 years later...
On 6/13/2014 at 7:54 AM, Tim_S said:

Dynamic dispatch can have an inheriting class (child object) override the VI (http://en.wikipedia.org/wiki/Method_overriding). Static dispatch prevents override by the inheriting class.

Is this a configurable property of a method vi, or once it's static, it's always static until you create a new vi with the same code in a dynamic dispatch method vi?

Link to comment

You can change your terminals to dynamic dispatch at any time by choosing This Connection Is > Dynamic Dispatch Input/Output (Required) at the terminal block.

You'll find that this option is only available for class inputs and outputs. To change your VI from static dispatch to dynamic dispatch, simply change both - input and output terminals - to dynamic dispatch.

image.png.0447a983d79077b1f666ce4114c0ed17.png

Edited by LogMAN
  • Like 1
Link to comment
On 6/13/2014 at 9:39 AM, Maxwell_Peng said:

Hello, everyone. I'm new to the LabVIEW OOP. What the difference bettween the dynamic dispatch vi and static dispatch vi in LabVIEW class?

A call to a static dispatch VI will always invoke that exact VI.

A call to a dynamic dispatch VI may invoke that VI or any VI of the same name of a descendant class. Exactly which VI will be called is decided at call time based on the type of the object that is on the wire going to the dynamic dispatch input terminal. A dynamic dispatch VI is equivalent to a virtual function in C++, C#, or JAVA (and other text languages). 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.