Creating Public Requests
Worker APIs
Last updated
Worker APIs
Last updated
A Public Request can be created by use of the Public API Builder tool. This tool (shown below) can be found in the Workers tools menu or activated from the Create MHL Case tool.
Step 1: Select the Worker or Worker base class that you want to create the Public Request for.
Step 2: In the Requests tab, select Create new Request. This will open up the window shown below.
Step 3: Fields to fill out when you create a Public Request include the following:
The name of the new MHL case that the tool will create to receive the Public Request message. This name will also be used by both the Public Request VI and typedef filenames.
Text that will be written on the Public Request VI and typedef icons, to help users to understand which MHL case will receive the Public Request message.
Provide a description that describes what function the receiving MHL case will perform when the Worker receives the Public Request message. This description is also written to the Public Request VI description.
When this option is TRUE, a Request VI will be created with dynamic dispatch input and output terminals (i.e. the Worker class object input and output terminals). An example of a dynamic dispatch Public Request VI is shown below:
In comparison to a regular static dispatch Public Request VI, there is no output terminal for the Caller's Main Data Wire.
You can use dynamic dispatch Public Request VIs to create Worker Public APIs using Interfaces in LabVIEW 2020 onwards. However the creation of the Interface and the handling of the VIs between multiple Workers that implement the Interface Public Request VIs is not implemented by the Workers 5.0 scripting tools.
Good to know
In its current configuration, only the required data on the Caller's Main Data Wire will be accessed, and not be copied, when wired to a dynamic dispatch Public Request VI.