03-07-2019 01:01 AM
@Norbert_B wrote:
...Sadly, one option other OOP languages can provide is not possible in LV OOP: Overloading...
Well, actually overloading is possible. Using a polymorphic VIs. And although they cannot hold dynamic-dispatch VIs, you can have a wrapper VI in the poly-VI and in that have the dynamic dispatch. I used that technique to build a HAL with overloaded methods. If I remember correctly, DAQmx is a good example of what can be done. I'm too tired right now though to understand if this solves the OP's question.
03-07-2019 02:38 AM
Thanks for the input Kevin and Bert. I had considered using a composition class in the properties of the instrument. In this case I was using actor framework and it seemed to be duplicative to have an actor handling an instrument and then a class in that actor that handled communication to the instrument. I might have another look at this in the future, it does seem like a sensible way of doing things.
And in the end it might just be faster to code something quick rather than something ideal!