07-20-2022 03:00 AM
I have a question about queued message handler architecture. If you have a VI that is acting as the UI and one acting as the DAQ, is it good practice for the UI to send a message directly to the DAQ loop, or should the message be directed through a message handler loop first? I normally do the latter, but am wondering whether this is overkill. The advantage of routing the message through a message handler is that you can log the messages for debugging purposes and ensure that messages are sent in the correct order, although I don’t normally do this.
07-20-2022 06:25 AM
I find the intermediate handler to be overkill. But if you look at the DQMH, every module has a message handler and process loop. So this is one of those cases where you just need to evaluate whether or not the extra loop is adding enough value to justify making more code.
07-28-2022 04:33 AM
Thanks for the advice. Seems like there is no one way to do this.