Creating a New DQMH Event
The different events
A DQMH Event can either be a request or a broadcast.
-
A request is code that fires an event that the DQMH Module Main.vi has the ability to act on.
-
A broadcast is code that fires an event that informs other VIs that are registered to listen that the DQMH Module Main.vi has done something.
-
There are also synchronous events of the type request and wait for reply. These events are fired when the DQMH Module Main.vi needs to return a reply to the VI that called the request and this calling VI must wait until it gets that reply (or the request times out).
Create a new event:
Videos demonstrating the following steps and other examples are available at: bit.ly/DelacorQMH |
Go to Tools>DQMH Consortium>DQMH>Event>Create New DQMH Event. Two windows will open: the Create New DQMH Event window and the DQMH Arguments Window.
If you create a Request and Wait for Reply event, the DQMH Reply Payload Window will also open. |
1 | Select the DQMH module for which you wish to create a new event. This drop down menu will only list valid DQMH modules found within the project. |
2 | Specify the type of event you wish to create. A description of each event type appears next to the drop down selection:
|
3 | Specify the name of the new event. For Round Trip events, you must specify names for both event components. |
4 | Add controls to the Arguments window. These values will be the arguments sent along with the event when it fires. Use a descriptive label for each control.
|
5 | Enter a description for the event. This description will be included as the VI documentation for the new event VI(s). |
6 | Click OK to create the new event(s). The new event VI(s) will be selected in the project explorer window after creation is complete. |
The DQMH Module Main.vi and Tester VI might be broken.
The developer has to complete several actions to complete the creation of this code, all of which are identified with #CodeNeeded bookmarks that can be explored with the Bookmark Manager window.
-
The developer needs to complete the following actions:
-
In the case of a new Request:
-
In the Tester VI:
-
By default, all the inputs of the request VI are required. Wire appropriate inputs to the request VI.
-
The Tester VI should no longer be broken (assuming it was not broken before the new event was added).
-
-
In the DQMH Module Main VI:
-
Add necessary code to the <request name> frame in the MHL case structure.
-
-
-
In the case of a new Broadcast:
-
In the Tester VI:
-
Add code to process the event data sent by the broadcast event.
-
The Tester VI should no longer be broken (assuming it was not broken before the new event was added).
-
-
In the DQMH Module Main VI:
-
Open the block diagram, which should have the newly created broadcast VI on the left side with a #CodeNeeded bookmark.
-
Move that VI wherever the newly created broadcast event needs to be called.
-
-
-
In the case of a new Request and Wait for Reply:
-
In the Tester VI:
-
By default, all the inputs of the request VI are required. Wire appropriate inputs to the request VI.
-
Process the reply payload output from the new request VI.
-
If the payload argument needs to be changed, open the new request VI and right-click the Reply Payload indicator to open its typedef and edit it accordingly.
-
The Tester VI should no longer be broken (assuming it was not broken before the new event was added).
-
-
In the DQMH Module Main VI:
-
Add necessary code to the <request name> frame in the MHL case structure.
-
Wire the proper reply to the Send Notification function.
-
-
-