07-30-2007 05:50 PM
07-31-2007 02:13 AM
Create a custom control and drop a data log file refnum control in it (from the refnum palette). You can now drop any data type you want inside the refnum control.
Of course, you can also edit existing refnums.
P.S. Why do you need a special refnum for an action engine? Why not just use a VI refnum?
If you want to go OO, there are various OO implementations (OpenGOOP, dqGOOP, Sciware GOOP, Endevo GOOP) and some of them do use these to represent classes.
07-31-2007 03:46 AM
07-31-2007 04:06 AM
@f. Schubert wrote:
handling large data sets (clusters of arrays and so on) by passing a reference to a local variable/AE; might increase performance
That would be a big no-no. When you use a reference to front panel control you create a copy of the data and you force the VI to execute in the UI thread and you will actually lose performance. LV does not really have pointers. The closest you get is refering to a data store by reference (which is what the GOOP implementations and your proposed AE by reference do).
When you pass your actual controls through subVIs, LV can optimize the memory allocation (under certain conditions) and avoid making data copies, which is the killer when dealing with a lot of data. I suggest you search DFGray's posts for his presentation on managing large data sets in LV.
07-31-2007 05:03 AM
07-31-2007 05:50 AM
I noticed you added the AE, but your "local variable" was what drew me to that conclusion.
Anyway, remember that if your functional global is only used for data store, you need to implement locking if you want to write to it from multiple places. Since you would probably want to encapsulate the locking, you would end up creating something similar to the GOOP implementations. In fact, it would be very similar to OpenGOOP, because that also uses reentrant LV2 globals called by reference as the data store.
Of course, if your FG has the functionality embedded in it, then that's another story.
07-31-2007 11:22 AM