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.
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!