Maxwell_Peng Posted June 13, 2014 Report Share Posted June 13, 2014 Hello, everyone. I'm new to the LabVIEW OOP. What the difference bettween the dynamic dispatch vi and static dispatch vi in LabVIEW class? Quote Link to comment
Tim_S Posted June 13, 2014 Report Share Posted June 13, 2014 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. 1 Quote Link to comment
Evan_J Posted March 27, 2020 Report Share Posted March 27, 2020 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? Quote Link to comment
LogMAN Posted March 27, 2020 Report Share Posted March 27, 2020 (edited) 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. Edited March 27, 2020 by LogMAN 1 Quote Link to comment
Aristos Queue Posted March 27, 2020 Report Share Posted March 27, 2020 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). Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.