12-04-2013 08:02 AM - edited 12-04-2013 08:13 AM
Hi, I have just started with LVOOP and while I'm pretty sure I have a good understanding of the overall theme, there is one problem I foresee if I continue.
Situation:
BoardType is parent of classes CC2600 and CC1300. Currently the child classes are just empty place holders.
Almost all the methods in the child classes will be of dynamic dispatch type (currently only one).
From what I understand a dynamic dispatch must be available in all child classes plus parent class in order to work as intended.
Problem:
If I would go forward and implementing LVOOP this would require approx 30 dynamic dispatch vis for each class. I can right click but for just these two children that's 60 + 30 vis I must create manually. I would much prefer just to create a template once and then just basically drag and drop 30+ new vis for each new class that is created.
Is there a way I can define a set of template dispatch vis in the parent BoardType and have them added to all the child classes?
I tried the save as copy, but the problem is that I still have to replace the connector pane to represent the new owning class.
If it helps here's a very basic block diagram of what's going to happen, just after Reset.vi there will be a lot of other dynamic dispatch vis.
Thanks in advance.
Michael
12-04-2013 09:22 AM - edited 12-04-2013 09:24 AM
You don 't need to define a dynamic dispatch VI for every level of the hierarchy.
The next lower version (parent, grandparent and so on) is automatically chosen. Don't duplicate a dynamic dispatch VI if you don't need different code within it. The rest is handled automatically.
Shane
PS In other words, only define a new DD vi if the code changes.
12-04-2013 10:27 AM
Thanks for the quick answer.
"Don't duplicate a dynamic dispatch VI if you don't need different code within it."
In other words - "Create a dynamic dispatch vi if you need different code in it".
This is my problem, different childs has different code for the same function. But I understand what you mean.
I wrote a scripting vi which takes in all DD vis and changes the connector pane programatically to a different class.
Michael
12-04-2013 12:21 PM
12-04-2013 11:49 PM
From the OP it sounded like you were literally just copying from the parent.
What I tend to do is finish one child class and then save a copy to a new name and change the internal data (if required) and DD vis (if required).
I do agree though that these kinds of operations could be hugely simplified using helper programs. Give the link provided by others a try.
Shane.