18 #include <vlutil/vlSmartPointers.h>
106 virtual std::vector<DtSimTaskMessageType> capableTaskIds()
const;
120 virtual void removeSupportingTasks(
int);
137 virtual bool executeTask(
DtTaskMessage& taskMsg,
bool clearConflictingTopLevelTasks =
true,
bool doNotAbandonPlan =
false);
138 virtual bool executeTask(
DtTaskMessage& taskMsg,
DtSimTaskStatePtr taskState,
bool clearConflictingTopLevelTasks =
true,
bool doNotAbandonPlan =
false);
143 virtual void addBackgroundProcess(
const DtString& scriptId,
int backgroundProcessId,
const DtString& controllerName);
144 virtual void removeBackgroundProcess(
const DtString& scriptId);
147 virtual void addScriptedSet(
const DtString& scriptId,
int backgroundProcessId,
const DtString& controllerName);
148 virtual void removeScriptedSet(
const DtString& scriptId);
161 virtual int suspendTasks(std::set<DtString> actionCategories);
164 virtual int suspendAllTopLevelTasks(
bool suspendedFromTrigger =
false);
167 virtual int suspendSubtask(
int taskId,
int subtaskId);
174 virtual bool resumeTasks(
int suspendId);
178 virtual void addTaskCompleteCallback(DtTaskCompleteCallbackList::DtCallbackFunctionType fcn,
void* usr);
179 virtual void removeTaskCompleteCallback(DtTaskCompleteCallbackList::DtCallbackFunctionType fcn,
void* usr);
184 virtual bool taskActive(
int taskId)
const;
187 virtual void registerInterfaceMessageCallbacks();
190 virtual void registerRadioMessageCallbacks();
195 bool clearConflictingTopLevelTasks =
true);
200 virtual void skipTask(
bool fromSuperior =
false);
207 virtual void taskComplete(
const DtVrfObjectMessage & radioMsg,
bool success,
bool affectsIndependentTaskStatus =
true);
211 virtual void sendTaskCompleted(
const DtTaskMessage& taskMsg,
bool success);
215 void awaitingTask(
int taskIdJustCompleted = -1);
219 virtual void setTaskedBySuperior();
222 virtual bool requestTaskNeeded()
const;
225 virtual void setRequestTaskNeeded(
bool requestTaskNeeded);
229 virtual bool independentlyTasked()
const;
233 virtual void setIndependentlyTasked(
bool independentlyTasked);
246 virtual void setSendSkipTaskMessages(
bool sendSkipTaskMessages);
247 virtual bool sendSkipTaskMessages();
252 virtual void addOnTaskNotifyCallback(
257 virtual void removeOnTaskNotifyCallback(
262 virtual void clearSubtask(
int subtaskId);
269 virtual bool hasTopLevelTask()
const;
279 virtual bool taskTypesAreExclusive(
const std::list<DtString>& task1Categories,
const DtSimTaskMessageType& taskType2)
const;
286 virtual void updateTaskInfo();
298 static void taskedBySuperiorRequestCallback(
DtSimMessage * msg,
void *
303 static void skipTaskCallback(
DtSimMessage * msg,
void * usr);
307 static void clearTaskCallback(
DtSimMessage * msg,
void * usr);
311 static void taskVisualizationRequestCallback(
DtSimMessage * msg,
void * usr);
314 virtual void setTaskVisualizationsActive(
bool);
325 static void addSimTaskManagerCreatorFcn(
const DtString & type,
333 virtual bool hasTopLevelTasks()
const;
339 virtual bool taskVisualizationsEnabled(
bool includeUnTimedOut)
const;
342 virtual bool taskVisualizationsActivated()
const;
346 virtual void taskCancelled(
int taskId);
350 bool taskNotify,
bool clearConflictingTopLevelTasks =
true,
bool doNotAbandonPlan =
false);
363 virtual void processTaskVisualizationRequest(
DtSimMessage * msg);
369 virtual bool clearAllTopLevelTasks();
385 void processSubordinateRemoved(
const DtUUID& info);
388 virtual void processSimObjectDeleted(
const DtSimObject*);
392 static void taskMessageCallback(
DtSimMessage* msg,
void* usr);
404 virtual std::vector<DtSimTaskMessageType> conflictingTaskTypes(
const DtSimTaskMessageType& testTaskType)
const;
412 static void unsubscribeCurrentTasksCallback(
const DtVrfObjectMessage* msg,
void* usr);
415 virtual void sendCurrentTasks();
419 virtual void updateTaskVisualizationList(
bool includeTimeout =
true);
422 virtual void stopCurrentTaskVisualizations();
424 static void clearTaskByTrackingNumberCallback(
const DtVrfObjectMessage* msg,
void* usr);
431 virtual void registerSetDataMessageCallbacks();
432 virtual void unregisterSetDataMessageCallbacks();
434 virtual void registerTaskMessageCallbacks();
435 virtual void unregisterTaskMessageCallbacks();
440 virtual void addDefaultClutterTaskTypes();
501 DelayTaskExecution() : doTaskNotify(false), clearConflictingTopLevelTasks(true), doNotAbandonPlan(false) {};
506 , clearConflictingTopLevelTasks(c)
507 , doNotAbandonPlan(p)
512 : taskMessage(orig.taskMessage)
513 , taskState(orig.taskState)
514 , doTaskNotify(orig.doTaskNotify)
515 , clearConflictingTopLevelTasks(orig.clearConflictingTopLevelTasks)
516 , doNotAbandonPlan(orig.doNotAbandonPlan)
DtTime myTaskVisualizationRemovalTime
Time at which task visualizations should be removed.
Definition: simTaskManager.h:470
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:527
Container used in callback lists.
Definition: simTaskManager.h:46
std::multimap< DtSimTaskMessageType, DtTaskControllerComponent * > DtTaskProcessorMap
Definition: simTaskManager.h:445
std::map< DtString, BackgroundProcessInformation > BackgroundProcesses
Definition: simTaskManager.h:488
DtSimTaskManager *(* DtSimTaskManagerCreatorFcn)(const DtString &name, DtLocalObject *vrfObject)
Definition: simTaskManagerFactory.h:16
DtSimTaskStatePtr taskState
Definition: simTaskManager.h:521
DtScriptReactiveTaskController * myReactiveTaskController
Definition: simTaskManager.h:474
std::vector< DtOnTaskNotifyCallbackInfo > myOnTaskNotifyCallbacks
Definition: simTaskManager.h:447
static DtSimTaskManagerFactory * theFactory
Definition: simTaskManager.h:476
DtRwNLengthStringVector is a named, readable/writable vector of strings of arbitrary length...
Definition: rwNLengthStringVector.h:28
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:464
virtual void postGetSelf()
Called after either version of getSelf (mtl or environment). Default is no-op.
DelayTaskExecution(const DtTaskMessage &msg, DtSimTaskStatePtr ptr, bool d, bool c, bool p)
Definition: simTaskManager.h:502
Definition: readerWriter.h:85
std::set< DtSimTaskMessageType > SupportingTasks
Definition: simTaskManager.h:69
End User Description: DtTaskControllerComponent is the base class for all controllers that respond to...
Definition: taskControllerComponent.h:48
Definition: readerWriterRegistry.h:39
DtTaskCompleteCallbackList myTaskCompleteCallbackList
Definition: simTaskManager.h:472
std::shared_ptr< DtSimTaskState > DtSimTaskStatePtr
Definition: taskAndTaskStateDefines.h:18
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:42
Definition: simTaskManager.h:499
DtLocalObject * myLocalObject
Definition: simTaskManager.h:443
static DtReaderWriterFactory * factory()
boost::signals2::scoped_connection mySubordinateRemovedConnection
Definition: simTaskManager.h:497
DelayedTaskExecution myDelayedTaskExecution
Definition: simTaskManager.h:528
bool doTaskNotify
Definition: simTaskManager.h:522
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
Specialized classes.
Definition: scriptedTaskTask.h:277
DtOnTaskNotifyCallbackFcn myCallbackFunction
Definition: simTaskManager.h:48
File: simMsg.h.
Definition: simMessage.h:35
Description: Readable, Writable int.
Definition: rwInt.h:25
void * myUserData
Definition: simTaskManager.h:49
DtTaskProcessorMap myTaskProcessorMap
Stores all the registered task processor interfaces, indexed by task type they process.
Definition: simTaskManager.h:451
bool mySendSkipTaskMessages
Determines whether processSubordinateRemoved will send a skip task message. This should only be chang...
Definition: simTaskManager.h:455
boost::signals2::scoped_connection mySimObjectDeletedConnection
Definition: simTaskManager.h:496
AvailableSupportingTasks myAvailableSupportingTasks
Definition: simTaskManager.h:480
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:68
Class Description: DtSimTaskManager manages the bookkeeping associated with starting, completing, clearing, and skipping tasks.
Definition: simTaskManager.h:55
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
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:101
std::shared_ptr< DtTaskMessage > taskMessage
Definition: simTaskManager.h:520
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:80
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:493
DtRwInt myNumberOfTaskSubscriptions
Counter which holds the number of times the current task status has been subscribed to minus the numb...
Definition: simTaskManager.h:460
BackgroundProcesses myBackgroundProcesses
Definition: simTaskManager.h:490
const DtReaderWriter & operator=(const DtReaderWriter &orig)
assignment operator
std::map< int, SupportingTasks > AvailableSupportingTasks
Definition: simTaskManager.h:70
Definition: simInterfaceContent.h:45
DelayTaskExecution(const DelayTaskExecution &orig)
Definition: simTaskManager.h:511
virtual bool isPseudoAggregate() const
Indicates whether or not the type of task manager created supports pseudo-aggregates.
Definition: simTaskManager.h:237
std::vector< DtSimTaskMessageType > myClutterTasks
Definition: simTaskManager.h:530
bool doNotAbandonPlan
Definition: simTaskManager.h:524
DtRwNLengthStringVector myTaskVisualizationRequestors
Whether task visualizations are enabled for this object.
Definition: simTaskManager.h:467
std::shared_ptr< DtTaskWithTaskStateList > DtTaskWithTaskStateListPtr
Definition: taskAndTaskStateDefines.h:27
BackgroundProcesses myScriptedSets
Definition: simTaskManager.h:491
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:523
DelayTaskExecution()
Definition: simTaskManager.h:501
bool myResumingTasks
Definition: simTaskManager.h:478
bool myFirstTick
Definition: simTaskManager.h:494
boost::signals2::connection myEventSignalConnection
Definition: simTaskManager.h:532
A locally simulated VRF object.
Definition: localObject.h:98
READ ME!
Definition: scriptReactiveTaskController.h:52