09-20-2021 06:36 AM
Hi everybody,
Is there a build-in way or an easy work-around to call a cloneable module by a custom name? F.ex. "Power Supply 01" to "Power Supply 10" I would like to put the name of a DQMH module into a config-file and make sure that the corresponding module always calls the correct (clone) DWMH module.
Right now, I am tracking the IDs inside a Dictionary ("name" => "mod_idx") myself, everytime I am starting/stopping a module. But it feels a bit weird and error prone.
Am I missing an easier solution?
Solved! Go to Solution.
09-20-2021 10:38 AM
Hello and thank you for putting your trust into DQMH!
There is no built-in way to access clones of DQMH modules by anything else but the clone ID. The solution you describe is probably the straight-forward one.
You could also look into overriding the module admin class with your own child implementation, where you could add a string, and then rework all places that use the integer to use the string instead. But that is a lot of work for little benefit IMHO.
In our (HSE) projects, we always use a Clone Manager module, which takes care of starting and stopping clones, and handling both clone instances and corresponding configuration data by name. We described the design of a clone manager in our Dokuwiki.
Hope that helps!
DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (The Future of Team-Based LabVIEW Development)
11-01-2021 10:50 AM
I can second Joerg’s suggest of using a clone manager, I did that for a project where I had various Camera clones. Using a camera manger, everywhere else could refer the the Camera using a location name and leave the Camera Manager as the single place the translation was done. Plus it could keep a record of which clones were running or stopped and other useful stuff.
i should admit it was Joerg who suggested it to me in the first place 👍😀