17 #include <vlutil/vlSmartPointers.h>
103 virtual std::vector<DtSimTaskMessageType> capableTaskIds()
const;
117 virtual void removeSupportingTasks(
int);
134 virtual bool executeTask(
DtTaskMessage& taskMsg,
bool clearConflictingTopLevelTasks =
true,
bool doNotAbandonPlan =
false);
135 virtual bool executeTask(
DtTaskMessage& taskMsg,
DtSimTaskStatePtr taskState,
bool clearConflictingTopLevelTasks =
true,
bool doNotAbandonPlan =
false);
140 virtual void addBackgroundProcess(
const DtString& scriptId,
int backgroundProcessId,
const DtString& controllerName);
141 virtual void removeBackgroundProcess(
const DtString& scriptId);
144 virtual void addScriptedSet(
const DtString& scriptId,
int backgroundProcessId,
const DtString& controllerName);
145 virtual void removeScriptedSet(
const DtString& scriptId);
158 virtual int suspendTasks(std::set<DtString> actionCategories);
161 virtual int suspendAllTopLevelTasks(
bool suspendedFromTrigger =
false);
164 virtual int suspendSubtask(
int taskId,
int subtaskId);
171 virtual bool resumeTasks(
int suspendId);
175 virtual void addTaskCompleteCallback(DtTaskCompleteCallbackList::DtCallbackFunctionType fcn,
void* usr);
176 virtual void removeTaskCompleteCallback(DtTaskCompleteCallbackList::DtCallbackFunctionType fcn,
void* usr);
181 virtual bool taskActive(
int taskId)
const;
184 virtual void registerInterfaceMessageCallbacks();
187 virtual void registerRadioMessageCallbacks();
192 bool clearConflictingTopLevelTasks =
true);
197 virtual void skipTask(
bool fromSuperior =
false);
204 virtual void taskComplete(
const DtVrfObjectMessage & radioMsg,
bool success,
bool affectsIndependentTaskStatus =
true);
208 virtual void sendTaskCompleted(
const DtTaskMessage& taskMsg,
bool success);
212 void awaitingTask(
int taskIdJustCompleted = -1);
216 virtual void setTaskedBySuperior();
219 virtual bool requestTaskNeeded()
const;
222 virtual void setRequestTaskNeeded(
bool requestTaskNeeded);
226 virtual bool independentlyTasked()
const;
230 virtual void setIndependentlyTasked(
bool independentlyTasked);
243 virtual void setSendSkipTaskMessages(
bool sendSkipTaskMessages);
244 virtual bool sendSkipTaskMessages();
249 virtual void addOnTaskNotifyCallback(
254 virtual void removeOnTaskNotifyCallback(
259 virtual void clearSubtask(
int subtaskId);
266 virtual bool hasTopLevelTask()
const;
276 virtual bool taskTypesAreExclusive(
const std::list<DtString>& task1Categories,
const DtSimTaskMessageType& taskType2)
const;
283 virtual void updateTaskInfo();
295 static void taskedBySuperiorRequestCallback(
DtSimMessage * msg,
void *
300 static void skipTaskCallback(
DtSimMessage * msg,
void * usr);
304 static void clearTaskCallback(
DtSimMessage * msg,
void * usr);
308 static void taskVisualizationRequestCallback(
DtSimMessage * msg,
void * usr);
311 virtual void setTaskVisualizationsActive(
bool);
322 static void addSimTaskManagerCreatorFcn(
const DtString & type,
330 virtual bool hasTopLevelTasks()
const;
336 virtual bool taskVisualizationsEnabled(
bool includeUnTimedOut)
const;
339 virtual bool taskVisualizationsActivated()
const;
343 virtual void taskCancelled(
int taskId);
353 virtual void processTaskVisualizationRequest(
DtSimMessage * msg);
359 virtual bool clearAllTopLevelTasks();
375 void processSubordinateRemoved(
const DtUUID& info);
378 virtual void processSimObjectDeleted(
const DtSimObject*);
382 static void taskMessageCallback(
DtSimMessage* msg,
void* usr);
393 bool taskNotify,
bool clearConflictingTopLevelTasks =
true,
bool doNotAbandonPlan =
false);
398 virtual std::vector<DtSimTaskMessageType> conflictingTaskTypes(
const DtSimTaskMessageType& testTaskType)
const;
406 static void unsubscribeCurrentTasksCallback(
const DtVrfObjectMessage* msg,
void* usr);
409 virtual void sendCurrentTasks();
413 virtual void updateTaskVisualizationList(
bool includeTimeout =
true);
416 virtual void stopCurrentTaskVisualizations();
418 static void clearTaskByTrackingNumberCallback(
const DtVrfObjectMessage* msg,
void* usr);
423 virtual void registerSetDataMessageCallbacks();
424 virtual void unregisterSetDataMessageCallbacks();
426 virtual void registerTaskMessageCallbacks();
427 virtual void unregisterTaskMessageCallbacks();
432 virtual void addDefaultClutterTaskTypes();
493 DelayTaskExecution() : doTaskNotify(false), clearConflictingTopLevelTasks(true), doNotAbandonPlan(false) {};
498 , clearConflictingTopLevelTasks(c)
499 , doNotAbandonPlan(p)
504 : taskMessage(orig.taskMessage)
505 , taskState(orig.taskState)
506 , doTaskNotify(orig.doTaskNotify)
507 , clearConflictingTopLevelTasks(orig.clearConflictingTopLevelTasks)
508 , doNotAbandonPlan(orig.doNotAbandonPlan)
DtTime myTaskVisualizationRemovalTime
Time at which task visualizations should be removed.
Definition: simTaskManager.h:462
UUID is a unique ID wrapper class.
Definition: uuid.h:59
Class Description: DtControllerComponentList.
Definition: controllerComponentList.h:38
std::vector< DelayTaskExecution > DelayedTaskExecution
Definition: simTaskManager.h:519
Container used in callback lists.
Definition: simTaskManager.h:42
std::multimap< DtSimTaskMessageType, DtTaskControllerComponent * > DtTaskProcessorMap
Definition: simTaskManager.h:437
std::map< DtString, BackgroundProcessInformation > BackgroundProcesses
Definition: simTaskManager.h:480
DtSimTaskManager *(* DtSimTaskManagerCreatorFcn)(const DtString &name, DtLocalObject *vrfObject)
Definition: simTaskManagerFactory.h:16
DtSimTaskStatePtr taskState
Definition: simTaskManager.h:513
DtScriptReactiveTaskController * myReactiveTaskController
Definition: simTaskManager.h:466
std::vector< DtOnTaskNotifyCallbackInfo > myOnTaskNotifyCallbacks
Definition: simTaskManager.h:439
static DtSimTaskManagerFactory * theFactory
Definition: simTaskManager.h:468
All the information about a single suspended task. This information should be sufficient to resume th...
Definition: suspendedTaskInfo.h:23
bool mySendTasksNextTick
Set to true if the task manager should send the list of current tasks next tick.
Definition: simTaskManager.h:456
int myNumberOfTaskSubscriptions
Counter which holds the number of times the current task status has been subscribed to minus the numb...
Definition: simTaskManager.h:452
DelayTaskExecution(const DtTaskMessage &msg, DtSimTaskStatePtr ptr, bool d, bool c, bool p)
Definition: simTaskManager.h:494
std::set< DtSimTaskMessageType > SupportingTasks
Definition: simTaskManager.h:66
End User Description: DtTaskControllerComponent is the base class for all controllers that respond to...
Definition: taskControllerComponent.h:48
DtTaskCompleteCallbackList myTaskCompleteCallbackList
Definition: simTaskManager.h:464
class DtSimTaskManagerFactory:
Definition: simTaskManagerFactory.h:24
void(* DtOnTaskNotifyCallbackFcn)(const DtSimTask &task, const DtSimComponent ¬ifier, void *usr)
Callback function definition for callbacks registered to be invoked when taskNotify() is called (when...
Definition: simTaskManager.h:38
Definition: simTaskManager.h:491
DtBoost::shared_ptr< DtSimTaskState > DtSimTaskStatePtr
Definition: taskAndTaskStateDefines.h:18
DtLocalObject * myLocalObject
Definition: simTaskManager.h:435
boost::signals2::scoped_connection mySubordinateRemovedConnection
Definition: simTaskManager.h:489
DelayedTaskExecution myDelayedTaskExecution
Definition: simTaskManager.h:520
bool doTaskNotify
Definition: simTaskManager.h:514
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
Specialized classes.
Definition: scriptedTaskTask.h:274
DtOnTaskNotifyCallbackFcn myCallbackFunction
Definition: simTaskManager.h:44
File: simMsg.h.
Definition: simMessage.h:35
void * myUserData
Definition: simTaskManager.h:45
DtTaskProcessorMap myTaskProcessorMap
Stores all the registered task processor interfaces, indexed by task type they process.
Definition: simTaskManager.h:443
bool mySendSkipTaskMessages
Determines whether processSubordinateRemoved will send a skip task message. This should only be chang...
Definition: simTaskManager.h:447
boost::signals2::scoped_connection mySimObjectDeletedConnection
Definition: simTaskManager.h:488
AvailableSupportingTasks myAvailableSupportingTasks
Definition: simTaskManager.h:472
Define constants for types of tasks, sets, admin messages, reports, and sim commands (all sent via ra...
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
DtCallbackList< const DtTaskMessage & > DtTaskCompleteCallbackList
Definition: simTaskManager.h:65
DtBoost::shared_ptr< DtTaskWithTaskStateList > DtTaskWithTaskStateListPtr
Definition: taskAndTaskStateDefines.h:27
std::set< DtSimulationAddress > myTaskVisualizationRequestors
Whether task visualizations are enabled for this object.
Definition: simTaskManager.h:459
Class Description: DtSimTaskManager manages the bookkeeping associated with starting, completing, clearing, and skipping tasks.
Definition: simTaskManager.h:52
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
Admin content that is used to send the current tasks status from a specific entity. This message is sent in response to a DtRequstCurrentTasksAdminContent or a subscription to the current task status using the same message. The current task status is a list of all the currently executing top level tasks that an entity has.
Definition: currentTasksAdminContent.h:113
std::shared_ptr< DtTaskMessage > taskMessage
Definition: simTaskManager.h:512
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:88
DtSimTask is an abstract base class from which real tasks can derive. It manages the read/write capab...
Definition: simTask.h:30
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
bool myTaskVisualizationsActive
Definition: simTaskManager.h:485
BackgroundProcesses myBackgroundProcesses
Definition: simTaskManager.h:482
std::map< int, SupportingTasks > AvailableSupportingTasks
Definition: simTaskManager.h:67
Definition: simInterfaceContent.h:45
DelayTaskExecution(const DelayTaskExecution &orig)
Definition: simTaskManager.h:503
virtual bool isPseudoAggregate() const
Indicates whether or not the type of task manager created supports pseudo-aggregates.
Definition: simTaskManager.h:234
std::vector< DtSimTaskMessageType > myClutterTasks
Definition: simTaskManager.h:522
bool doNotAbandonPlan
Definition: simTaskManager.h:516
BackgroundProcesses myScriptedSets
Definition: simTaskManager.h:483
A DtTaskMsg is a DtRadioMsg with a pointer to a task. The type of the taskMsg is just the type of the...
Definition: taskMessage.h:21
bool clearConflictingTopLevelTasks
Definition: simTaskManager.h:515
DelayTaskExecution()
Definition: simTaskManager.h:493
bool myResumingTasks
Definition: simTaskManager.h:470
bool myFirstTick
Definition: simTaskManager.h:486
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
READ ME!
Definition: scriptReactiveTaskController.h:53