Standard Messages

A standard message (asynchronous) is the most common type of message that is used in the framework. You can send a standard message to the case of any Worker's MHL that expects to receive a standard message.

How to send a standard message

Step 1: Create a case to receive the standard message

First you need to create a case in a Worker's MHL to receive a standard message. This is as simple as adding a new case to a case structure, with the name of the case of your choice. For this example, let's create a new case in a Worker's MHL called <Receive Value>, as shown below.

Let's also allow this case to receive some data in the form of a numeric integer. Since the data format used within a message is a variant, we need to convert the variant to the correct data type, using the LabVIEW palette VI: Variant to data.

Step 2: Send a standard message to the case we just created

We now want to send a standard message to the case we created above in Step 1. To do this, we can drop the Workers palette VI: Enqueue Standard Message.vi (poly) into the case of a Worker that has access to the message queue of the Worker we want to send the message to.

So let's say the MHL case in Step 1 belongs to Worker A. Therefore, as shown below, we would wire up the Enqueue Standard Message.vi with the following inputs:

  • Recipient Worker's Queue (Message Queue): the message queue of the Worker that you want to send the standard message to.

  • Recipient Worker's Case (String): the case of the Worker that will receive the standard message, defined as a string, wrapped in a Case Label.

  • Data (variant): any data that you want to send along with the standard message.

  • Priority (enum): the priority of the standard message (not shown above)

  • Auxiliary (variant): any additional data that you want to send along with the standard message (not shown above)

This completes the sending of a standard message within the framework.

The Fundamentals sample project demonstrates how to send standard messages with the Enqueue Standard Message.vi.

Last updated