FlamingYawn Posted January 14, 2014 Report Share Posted January 14, 2014 Has anyone used "Get LV Class Default Value VI" to dynamically load classes on RT? Link to comment
Slickificationalize Posted August 28, 2015 Report Share Posted August 28, 2015 I've seen it used once before. It was implemented to load a class from a file path, based on a configuration that provided the class name. Then the ref was cast to a more specific class, which was in fact the parent class of the originally targeted class. At first glance, it seemed entirely backwards, but my first inclination looking at the data is that the use of "To More Specific Class" and the parent class as the class that the ref was cast to was done in order to ensure that the class called was aware of its inheritance. Though I don't definitively understand how it functioned, it did work quite smoothly. Link to comment
Rolf Kalbermatter Posted August 29, 2015 Report Share Posted August 29, 2015 Has anyone used "Get LV Class Default Value VI" to dynamically load classes on RT? I did, using a variant of the factory pattern. It was an instrument driver for a USB serial device that could have two different device types. Implemented the low level drivers for each device as a derived class of the main class which was the actual interface used by a user of the driver. Depending on a selection by the user either of the two low level drivers was instantiated and used for the actual implementation of the device communication. Worked fine except that you need to do some path magic to allow for execution on the RT target. It's mostly the same as what you need to do for execution in a build application but there is a difference between the paths when you deploy the program directly from the project (during debugging for instance) and when you build an rtexe application and execute that. Link to comment
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now