VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
12.7 - Adding a User Task

Table of Contents

The alternative to deriving a new task from DtSimTask, is to use DtUserTask message.

Use this method if you want users to be able to specify user-defined tasks in the front-end. Instead of deriving a new DtSimTask class to convey the data about the new task, you can use the DtUserTask message as a wrapper around the new task data. You still need to create your own derived controllers to handle the new task.

12.7.1 Configuring a User Task from the GUI

The DtUserTask class has an interface that takes a string userTaskName (required), and up to four string arguments (optional). The userTaskName string is a unique string used to identify the task.

Note
This string is different from the DtUserTask::type() string used to identify the task message. You can use the DtUserTask for any number of user-defined tasks. The userTaskName serves to distinguish between the different types of messages wrapped inside the DtUserTask message.

The User Task dialog box is used to specify a DtUserTask.

12.7.2 Adding a Controller for a User Task

The Add Task (addTaskSim) example (./examples/addTaskSim) shows how to add a controller for a task. Like all the examples, the directory includes sample project files so that you can build it.

[<< Handling Unachievable Tasks] [Home] [Top of Page] [Creating a New DtSetData Request >>]


Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)