VR-Forces 4.2 Class Documentation
12.6 - 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.6.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.6.2 Adding a Controller for a User Task

The Add Task 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 Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)