Jump to content

Queued Message Handler: Difference between revisions

From LabVIEW Wiki
Added content from the FANDOM site.
 
m Changed wording to match Design Pattern Overview page
Line 1: Line 1:
The '''Queued Message Handler (QMH)''' design pattern is a combination of [[producer/consumer]], [[Event Handler|event handler]] and [[state machine]] architectures together.  The producer loop contains an event structure that sends messages to the consumer loop.  The consumer receives and processes the messages in a state machine.  A message can be triggered by UI events or from other states in the state machine.  The QMH can also be designed to provide feedback from the consumer to the producer using User Events.<ref>"Queued Message Handler Template" by National Instruments (http://www.ni.com/tutorial/53391/en/)</ref>
The '''Queued Message Handler (QMH)''' design pattern is a combination of [[producer/consumer]], and [[Event Handler|event handler]] architectures together.  The producer loop, called the Event Handler Loop (EHL), contains an event structure that sends messages to the consumer loop, called the Message Handler Loop (MHL). The MHL receives and processes the messages. A message is enqueued when a UI event is triggered. The QMH can also be designed to provide feedback from the consumer to the producer using User Events.<ref>"Queued Message Handler Template" by National Instruments (http://www.ni.com/tutorial/53391/en/)</ref>
 
[[File:Queued Message Handler Design Pattern.png|700x700px|frameless|center|Queued Message Handler (QMH) with one Event Handler Loop (EHL) and one Message Handler Loop (MHL)]]
[[File:Queued Message Handler Design Pattern.png|700x700px|frameless|center|Queued Message Handler (QMH) with one Event Handler Loop (EHL) and one Message Handler Loop (MHL)]]



Revision as of 20:34, 11 November 2018

The Queued Message Handler (QMH) design pattern is a combination of producer/consumer, and event handler architectures together.  The producer loop, called the Event Handler Loop (EHL), contains an event structure that sends messages to the consumer loop, called the Message Handler Loop (MHL). The MHL receives and processes the messages. A message is enqueued when a UI event is triggered. The QMH can also be designed to provide feedback from the consumer to the producer using User Events.[1]

Queued Message Handler (QMH) with one Event Handler Loop (EHL) and one Message Handler Loop (MHL)
Queued Message Handler (QMH) with one Event Handler Loop (EHL) and one Message Handler Loop (MHL)

Use Cases

Add yours here

References

  1. "Queued Message Handler Template" by National Instruments (http://www.ni.com/tutorial/53391/en/)