Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Actor Framework Message Maker Dialog Box

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Requires: Base Development System

Load a project that uses the Actor Framework and select Tools»Actor Framework Message Maker to display this dialog box.

Use this dialog box to create a child class of the ancestor Message class.

This dialog box includes the following components:

  • Project to display—Lists projects in memory.
  • Actor classes and their methods—Lists actors and their public-scope methods in the selected Project to display. If a method is dimmed, it already has a message class. If an actor is dimmed, all of its methods already have message classes.

    To create multiple messages at once, select more than one method from this list. To build messages for all methods of a class at once, select the class itself.
  • Build Selected—Creates a message class whose Do method invokes the method you selected in the Actor classes and their methods list. If you selected multiple methods, a message class will be created for each method.

After you click Build Selected, LabVIEW creates method Msg.lvclass in the Project Explorer window, where method is the method you selected from the Actor classes and their methods list.

For example, if you select Task from this list:

LabVIEW creates Task Msg.lvclass:

where:

  • Task Msg.lvclass:Task Msg.ctl is private data the message carries. LabVIEW populates this control with parameters for the method you selected.
  • Task Msg.lvclass:Send Task.vi is the VI other actors use to create and send the message.
  • Task Msg.lvclass:Do.vi defines what the message does when it is received by an actor. The Do method checks the type of the actor by attempting to cast the input actor to the class of the selected actor. If this cast is successful, the method is invoked.

    Task Msg.lvclass:Do.vi overrides Message.lvclass:Do.vi.

LabVIEW also displays the windows for the members of the class. Edit these members according to the needs of your application.

LabVIEW saves method Msg.lvclass and its members to disk in the folder that contains the selected actor class. The new folder name is the same as the new message class without the file extension.

If the new message class always is needed by the actor that receives it, National Instruments recommends placing the new message class in the same project library as the actor. Refer to the Actor Framework template and Feedback Evaporative Cooler sample project, available from the Create Project dialog box, for examples of organizing related actors and messages.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit