07-17-2026 04:59 AM
Hi,
looking for a best practice (if it exists): the argument of my request&reply - besides the error cluster and the wait notifier - is cluster(A). Within (A) there are two other clusters (B) and (C).
(B) and (C) are typedefs. The question is: should I make (A) a typedef?
To expand my question: in general should the arguments of a request be a typedefs? Something suggests me that its probably a good idea because then I could be sure that my input always matches the input required by the request itself. On the other hand if this would be such a good idea then it probably would have been scripted like this.
thx.
ps.: two years after I had to drop labview I'm back on a project I need to use DQMH. Pretty excited to see whats news!
07-17-2026 05:18 AM
Hi,
as best practice from my side: don't use typedefs inside arguments. If you need typedefs it is better to cast your argument cluster inside the request MHL and at the callers side also.
07-17-2026 05:25 AM
Lets you dont make them typedef and you started to use the request gazillion places. Then you realize that the the cluster you had in the arguments needs to be updated with a new field. In this case - I assume - you need to find every places you called the request and modify the inputs. This looks quite a job to do.
Do I miss something?
07-17-2026 05:40 AM
Do I understand correctly that you're talking about a situation like this one:
Yes, definitely: A, B and C would be type definitions for me. Argument or no argument - a cluster should be typedef'ed.
Related question: Who will own those typedefs? Are they members of that module?
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® (Developer Experience that makes you smile )
07-17-2026 07:08 AM
Yes, this is the argument I tried to explain.
I think the typedefs should be owned by the DQMH module itself because ultimately the request is the end user of the data.
07-17-2026 12:58 PM
A suggestion for consideration:
Have separate inputs on your request SubVI for B and C. Don't expose cluster A outside the Module at all. If you add a third thing later on, this is another input, which can be set required if you want to force users to include it.
07-18-2026 12:33 PM
Be very careful with typedef ownership. It can easily create unwanted dependencies. I tend to try to use simple types where possible when data crosses boundaries and only use typedefs inside modules/components. That limits unwanted dependencies. Definitely if you need to share across boundaries, the depended upon component should own the type def.
07-18-2026 12:37 PM
This may seem like anathema, but on the past couple of projects I've worked on, I've been creating a top-level non-namespaced folder in the project that contains utility VIs and typedefs that are used across different libraries/classes in the project. That way I don't have to worry about ownership of those shared components. It's been working well. I only need to worry about tightening that up if I end up reusing a class/library in a different project, but that doesn't happen very often... most of the libraries/classes I write are project-specific.
07-19-2026 09:39 AM - edited 07-19-2026 09:40 AM
@Darren wrote:
This may seem like anathema, but on the past couple of projects I've worked on, I've been creating a top-level non-namespaced folder in the project that contains utility VIs and typedefs that are used across different libraries/classes in the project. That way I don't have to worry about ownership of those shared components. It's been working well. I only need to worry about tightening that up if I end up reusing a class/library in a different project, but that doesn't happen very often... most of the libraries/classes I write are project-specific.
very similar to what I do when I have a typedef that's needed by multiple components.
07-20-2026 12:50 AM