![]() |
VR-Forces 5.0.1 Developer's Guide
|
Class Description: DtSimTaskManager manages the bookkeeping associated with starting, completing, clearing, and skipping tasks.

Classes | |
| struct | BackgroundProcessInformation |
| struct | DelayTaskExecution |
Public Types | |
| typedef DtCallbackList< const DtTaskMessage & > | DtTaskCompleteCallbackList |
| typedef std::set < DtSimTaskMessageType > | SupportingTasks |
| typedef std::map< int, SupportingTasks > | AvailableSupportingTasks |
Static Public Member Functions | |
| static void | taskedBySuperiorRequestCallback (DtSimMessage *msg, void *usrData) |
| static void | skipTaskCallback (DtSimMessage *msg, void *usr) |
| static void | clearTaskCallback (DtSimMessage *msg, void *usr) |
| static void | taskVisualizationRequestCallback (DtSimMessage *msg, void *usr) |
| static DtSimTaskManager * | creator (const DtString &name, DtLocalObject *vrfObject) |
| static DtSimTaskManagerFactory * | factory () |
| static void | setFactory (DtSimTaskManagerFactory *factory) |
| static void | addSimTaskManagerCreatorFcn (const DtString &type, DtSimTaskManagerCreatorFcn fcn) |
| static DtSimTaskManager * | createTaskManager (const DtString &name, const DtString &type, DtLocalObject *vrfObject) |
Protected Types | |
| typedef std::map < DtSimTaskMessageType, DtTaskControllerComponent * > | DtTaskProcessorMap |
| typedef std::map< DtString, BackgroundProcessInformation > | BackgroundProcesses |
| typedef std::vector < DelayTaskExecution > | DelayedTaskExecution |
Static Protected Member Functions | |
| static void | taskMessageCallback (DtSimMessage *msg, void *usr) |
| static void | requestCurrentTasksCallback (const DtVrfObjectMessage *msg, void *usr) |
| static void | unsubscribeCurrentTasksCallback (const DtVrfObjectMessage *msg, void *usr) |
| static void | clearTaskByTrackingNumberCallback (const DtVrfObjectMessage *msg, void *usr) |
Protected Attributes | |
| DtLocalObject * | myLocalObject |
| std::vector < DtOnTaskNotifyCallbackInfo > | myOnTaskNotifyCallbacks |
| DtTaskProcessorMap | myTaskProcessorMap |
| bool | mySendSkipTaskMessages |
| int | myNumberOfTaskSubscriptions |
| bool | mySendTasksNextTick |
| std::set< DtSimulationAddress > | myTaskVisualizationRequestors |
| DtTime | myTaskVisualizationRemovalTime |
| DtTaskCompleteCallbackList | myTaskCompleteCallbackList |
| DtScriptReactiveTaskController * | myReactiveTaskController |
| bool | myResumingTasks |
| AvailableSupportingTasks | myAvailableSupportingTasks |
| BackgroundProcesses | myBackgroundProcesses |
| BackgroundProcesses | myScriptedSets |
| bool | myTaskVisualizationsActive |
| bool | myFirstTick |
| boost::signals2::scoped_connection | mySimObjectDeletedConnection |
| boost::signals2::scoped_connection | mySubordinateRemovedConnection |
| DelayedTaskExecution | myDelayedTaskExecution |
Static Protected Attributes | |
| static DtSimTaskManagerFactory * | theFactory |
Private Member Functions | |
| DtSimTaskManager () | |
| DtSimTaskManager (const DtSimTaskManager &orig) | |
| const DtSimTaskManager & | operator= (const DtSimTaskManager &orig) |
| typedef DtCallbackList<const DtTaskMessage&> DtSimTaskManager::DtTaskCompleteCallbackList |
| typedef std::set<DtSimTaskMessageType> DtSimTaskManager::SupportingTasks |
| typedef std::map<int, SupportingTasks> DtSimTaskManager::AvailableSupportingTasks |
|
protected |
|
protected |
|
protected |
|
private |
Not implemented.
|
private |
copy constructor
| DtSimTaskManager::DtSimTaskManager | ( | const DtString & | name, |
| DtLocalObject * | vrfObject | ||
| ) |
constructor
|
virtual |
destructor
|
private |
assignment operator
|
virtual |
Calls base class init(), and registerRadioMessageCallbacks().
|
virtual |
Sends awaitingTask message to plan engine if needed.
|
virtual |
Registers a task controller as a processor for a specific task type. This controller will have its beginProcessingTask() method called whenever a task of this type is executed by this task manager. Only one component may be registered for any given task type at a time, and this call will replace any already existing controller for this task type. An object console warning will be displayed when a controller is replaced.
|
virtual |
Removes a task controller that has previously registered for as a task processor for a specific task type.
|
virtual |
Removes all task processors that are registered by this controller.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Adds/remove supporting tasks. Types are available in scriptedTaskMetaData.h.
|
virtual |
Adds/remove supporting tasks. Types are available in scriptedTaskMetaData.h.
|
virtual |
Adds/remove supporting tasks. Types are available in scriptedTaskMetaData.h.
|
virtual |
Adds/remove supporting tasks. Types are available in scriptedTaskMetaData.h.
|
virtual |
Starts the execution of this task. This is the main entry point of an entity to start executing any task or subtask. The task will be passed off to any task controller that has registered to process the particular type of this task. Fills in the taskId of the task message with the newly assigned ID of the task.
| taskState | If present, used to convey information about the current execution state of the task (may be at some intermediate point in execution). |
| clearConflictingTopLevelTasks | Normally executing a new task will clear any top level tasks that are conflicting. If, however, you have previously suspended the conflicting tasks, you may not want to clear them out. |
|
virtual |
Starts the execution of this task. This is the main entry point of an entity to start executing any task or subtask. The task will be passed off to any task controller that has registered to process the particular type of this task. Fills in the taskId of the task message with the newly assigned ID of the task.
| taskState | If present, used to convey information about the current execution state of the task (may be at some intermediate point in execution). |
| clearConflictingTopLevelTasks | Normally executing a new task will clear any top level tasks that are conflicting. If, however, you have previously suspended the conflicting tasks, you may not want to clear them out. |
|
virtual |
Used for reporting curent tasks only. Keeps track of all currently executing background processes.
|
virtual |
|
virtual |
Used for reporting current tasks only. Keeps track of scripted sets that are currently running.
|
virtual |
|
virtual |
Transitions the task from controller state to another. Basically reissues the task with the same id to the same controller, using saved state. Currently used by the aggregate model resolution controller when transitioning from aggregated <-> dissaggregated states. When transitioning the task, if there is a plan in progress that is executing this task the plan will not be abandoned. Also, the newly issued task will maintain the same task id as the original task.
Function to suspend. Suspends all top level tasks that conflict with any of the listed actionCategories.
|
virtual |
Suspends all top level tasks.
Suspends a specific subtask.
|
virtual |
Suspends a specific task, and returns the suspend info.
Takes a suspend ID generated from a call to suspend, and resumes any tasks that were suspended with this ID.
|
virtual |
Callbacks that are invoked any time a task is complete.
|
virtual |
Callbacks that are invoked any time a task is complete.
|
virtual |
Registers a callback for Skip Task messages.
|
virtual |
Register for TaskedBySuperior and DtClearTask radio messages.
|
virtual |
Called by controller component when task is received. Calls clearTask() on the currently tasked controller that has a top-level (non-subtask) task.
|
virtual |
Called by controller component when task is received. Calls clearTask() on the currently tasked controller that has a top-level (non-subtask) task. If fromSuperior is false, calls sendAwaitingTask().
|
virtual |
Called by controller component when task is complete.
| success | indicates whether the task was successfully completed or failed. There are some tasks (such as reactive tasks) when they complete should not affect the independently tasked flag. The las parameter, if set to true, will do just that |
|
virtual |
send a task complete report message to the originator of a task (as indicated by the sender field of the task message sent)
| void DtSimTaskManager::awaitingTask | ( | int | taskIdJustCompleted = -1 | ) |
Calls awaitingTask on the DtPlan via the DtVrfObjectPlanManager Specify the task ID of the task that just completed, if available.
|
virtual |
Equivalent to localState()->setIndependentlyTasked(false) for local entities, but deriving pseudo aggregates do more...
|
virtual |
Will we ask the plan manager for a task this tick.
|
virtual |
Used within the task manager.
|
virtual |
Are we tasked independently (plan or user) or by a superior (pseudo-aggregate) entity?
|
virtual |
Sets independentlyTasked flag. Normally done when a task is received, or a setTaskedBySuperior message is received.
|
inlinevirtual |
Indicates whether or not the type of task manager created supports pseudo-aggregates.
|
virtual |
Returns the type of task manager object. Strings are defined in taskMgrTypes.h.
|
virtual |
Accessor/mutator for mySendSkipTaskMessages. This should only be called by DtCgf::rewind.
|
virtual |
Accessor/mutator for mySendSkipTaskMessages. This should only be called by DtCgf::rewind.
|
virtual |
Registers callback to invoked after taskNotify() is called (at the point when an entity starts executing a new task).
|
virtual |
Removes callback to invoked after taskNotify() is called (at the point when an entity starts executing a new task).
|
virtual |
Locates DtTaskControllerComponent currently executing a task with the given subtaskId, and calls clearTask() on that component.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
static |
The manager will register a callback with the radio's msg executive requesting notification of Tasked By Superior Set Data Requests.
|
static |
The manager will register a callback with its simManager's msg executive requesting notification of Skip Task Interface Requests.
|
static |
Callback function for handling DtClearTask messages. Calls processClearTask to process the message.
|
static |
Callback function for handling task visualization request messages. Calls processTaskVisualizationRequest.
|
virtual |
Set to false to turn off task visualizations for this object.
|
static |
|
static |
A DtSimEntityFactory is allocated by the DtSimCreator, and this pointer is set. The DtSimCreator deletes this pointer when it is deleted. This is done this way because we don't allow static initialization.
|
static |
|
static |
|
static |
Creates a new task manager, using the factory.
|
virtual |
Returns true if there are top level tasks.
Returns true if task visualizations are enabled for this object.
|
virtual |
Returns true if any of this object's components have task visualizations activated.
|
protectedvirtual |
Finds task controller currently tasked with task of type specified in clear task message and calls its clearTask() method. task type, calls clearTask().
|
protectedvirtual |
Creates or destroys task visualization objects.
|
protectedvirtual |
|
protectedvirtual |
Cancels all top level tasks currently executing on the entity.
|
protectedvirtual |
Cancels any top level tasks that are running on the entity if they conflict with the specified task type. taskTypesAreExclusive() is used to determine if they conflict.
|
protectedvirtual |
Hook function called at the end of taskNotify(). Invokes any onTaskNotify() callback functions that are registered with the task manager.
|
protected |
If we are currently tasked and former subordinate is not independently tasked, sends a skip task message to this former subordinate. The subordinate should no longer be participating in any tasks currently being executed by this entity.
|
protectedvirtual |
Called in response to the owner being deleted.
|
staticprotected |
Callback resisted with the local radio for all task messages. Calls processTaskMessage().
|
protectedvirtual |
Calls executeTask().
|
protectedvirtual |
Used by executeTask() and other similar methods to start the execution of a task.
|
protectedvirtual |
|
protectedvirtual |
|
staticprotected |
|
protectedvirtual |
|
staticprotected |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Updates the list of current activated task visualizations. Called once per tick.
|
protectedvirtual |
Stops sending any current task visualizations. Called when task visualizations are disabled or deactivated.
|
staticprotected |
|
protectedvirtual |
|
protectedvirtual |
Handles registration/deregistration of callbacks.
Reimplemented in DtSimEngineeringTaskManager.
|
protectedvirtual |
Handles registration/deregistration of callbacks.
|
protectedvirtual |
Handles registration/deregistration of callbacks.
|
protectedvirtual |
Handles registration/deregistration of callbacks.
|
protected |
|
protected |
|
protected |
Stores all the registered task processor interfaces, indexed by task type they process.
|
protected |
Determines whether processSubordinateRemoved will send a skip task message. This should only be changed by DtCgf::rewind.
|
protected |
Counter which holds the number of times the current task status has been subscribed to minus the number of times it has been unsubscribed. (>0 means that someone is subscribed)
|
protected |
Set to true if the task manager should send the list of current tasks next tick.
|
protected |
Whether task visualizations are enabled for this object.
|
protected |
Time at which task visualizations should be removed.
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |