DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Call a cloneable module by unique name (instead of Integer ID)

Solved!
Go to solution

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? 

0 Kudos
Message 1 of 3
(1,486 Views)
Solution
Accepted by topic author hallo2014

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)


Message 2 of 3
(1,456 Views)

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 👍😀

 

 

Danny Thomson AshVire Ltd
Message 3 of 3
(1,358 Views)