DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Is sending requests from a module's EHL okay

Solved!
Go to solution

If my EHL receives a broadcast, and in response to that needs to message another module, should it be going via the MHL?

 

Shiv0921_1-1751041817752.png

 

 

In a lot of places in my code I have option A occuring, where a broadcast will come in and I immediately want to message something else, so I send that request straight from my EHL. 
However it occured to me that perhaps B is actually the reccomended way as it means the EHL doesnt have to have a list of any module IDs and it keeps the MHL aware of everything going on. I hadnt felt option A was clogging up my EHL as its just sending a request, but certainly if I wanted to do some other action I'd need an MHL case.

 

But to change it I'll have to manually make every corresponding MHL case, and make every event case send messages to these. The lack of scripting of this makes me wonder if it is the reccomended way?

 

Wanted to check before i embark on something quite tedious.

-------------------
CLD
0 Kudos
Message 1 of 8
(376 Views)
Solution
Accepted by topic author Shiv0921

Any of these options are probably fine, I don't see an inherent problem with A or B. And there's also option C, where you have a Helper Loop that is responsible for registering for broadcasts of interest, and then messaging the other modules from there. That way your helper loop is responsible for maintaining the Module IDs and you don't need to set up any additional inter-loop communication.

 

The possibilities are endless at least three!

Message 2 of 8
(360 Views)

Adding any data (eg module IDs) to the EHL is a „yellow“ flag for me and I would take a good look at all alternatives before going with it. 




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 )


Message 3 of 8
(312 Views)

Okay thank you, do you generally forward all your broadcasts that you receive to the MHL then? 

-------------------
CLD
0 Kudos
Message 4 of 8
(294 Views)

@Shiv0921 wrote:

Okay thank you, do you generally forward all your broadcasts that you receive to the MHL then? 


It's difficult to give a blanket answer. I'd guess though that the most common use case for me is to have a helper loop as I prefer to keep the module-internal events (EHL) and external events (HL) separate. 




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 )


Message 5 of 8
(292 Views)

Okay thank you! I'll do some more reading on the different flavours of helper loops. Cheers

-------------------
CLD
0 Kudos
Message 6 of 8
(270 Views)

May I suggest the following two reading resources:

 

1. https://dokuwiki.hampel-soft.com/kb/labview-frameworks/dqmh/starting-modules

2. https://hampel-soft.com/blog/dqmh-actors-self-messaging-or-helper-loops/ (somewhat dated but not completely obsolete)




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 )


Message 7 of 8
(264 Views)

Thank you! Yes I restructured where I'd been starting my modules just this week based on your link! Great resources.

Will read through the helper loop one 🙂 I've already got a number of helper loops for repetitive tasks, but hadn't considered other options for them, like message forwarding, which I like the idea of. So thanks

-------------------
CLD
Message 8 of 8
(258 Views)