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();
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;
333 virtual bool taskVisualizationsEnabled(
bool includeUnTimedOut)
const;
336 virtual bool taskVisualizationsActivated()
const;
346 virtual void processTaskVisualizationRequest(
DtSimMessage * msg);
352 virtual bool clearAllTopLevelTasks();
368 void processSubordinateRemoved(
const DtUUID& info);
371 virtual void processSimObjectDeleted(
const DtSimObject*);
375 static void taskMessageCallback(
DtSimMessage* msg,
void* usr);
382 bool taskNotify,
bool clearConflictingTopLevelTasks =
true,
bool doNotAbandonPlan =
false);
387 virtual std::vector<DtSimTaskMessageType> conflictingTaskTypes(
const DtSimTaskMessageType& testTaskType)
const;
395 static void unsubscribeCurrentTasksCallback(
const DtVrfObjectMessage* msg,
void* usr);
398 virtual void sendCurrentTasks();
402 virtual void updateTaskVisualizationList(
bool includeTimeout =
true);
405 virtual void stopCurrentTaskVisualizations();
407 static void clearTaskByTrackingNumberCallback(
const DtVrfObjectMessage* msg,
void* usr);
412 virtual void registerSetDataMessageCallbacks();
413 virtual void unregisterSetDataMessageCallbacks();
415 virtual void registerTaskMessageCallbacks();
416 virtual void unregisterTaskMessageCallbacks();
478 DelayTaskExecution() : doTaskNotify(false), clearConflictingTopLevelTasks(true), doNotAbandonPlan(false) {};
483 , clearConflictingTopLevelTasks(c)
484 , doNotAbandonPlan(p)
489 : taskMessage(orig.taskMessage)
490 , taskState(orig.taskState)
491 , doTaskNotify(orig.doTaskNotify)
492 , clearConflictingTopLevelTasks(orig.clearConflictingTopLevelTasks)
493 , doNotAbandonPlan(orig.doNotAbandonPlan)
DtTime myTaskVisualizationRemovalTime
Time at which task visualizations should be removed.
Definition: simTaskManager.h:447
UUID is a unique ID wrapper class.
Definition: rwUUID.h:226
Class Description: DtControllerComponentList.
Definition: controllerComponentList.h:38
std::vector< DelayTaskExecution > DelayedTaskExecution
Definition: simTaskManager.h:504
Container used in callback lists.
Definition: simTaskManager.h:42
std::map< DtString, BackgroundProcessInformation > BackgroundProcesses
Definition: simTaskManager.h:465
DtSimTaskManager *(* DtSimTaskManagerCreatorFcn)(const DtString &name, DtLocalObject *vrfObject)
Definition: simTaskManagerFactory.h:16
DtSimTaskStatePtr taskState
Definition: simTaskManager.h:498
DtScriptReactiveTaskController * myReactiveTaskController
Definition: simTaskManager.h:451
std::vector< DtOnTaskNotifyCallbackInfo > myOnTaskNotifyCallbacks
Definition: simTaskManager.h:424
static DtSimTaskManagerFactory * theFactory
Definition: simTaskManager.h:453
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:441
int myNumberOfTaskSubscriptions
Counter which holds the number of times the current task status has been subscribed to minus the numb...
Definition: simTaskManager.h:437
DelayTaskExecution(const DtTaskMessage &msg, DtSimTaskStatePtr ptr, bool d, bool c, bool p)
Definition: simTaskManager.h:479
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:449
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:476
DtBoost::shared_ptr< DtSimTaskState > DtSimTaskStatePtr
Definition: taskAndTaskStateDefines.h:18
DtLocalObject * myLocalObject
Definition: simTaskManager.h:420
boost::signals2::scoped_connection mySubordinateRemovedConnection
Definition: simTaskManager.h:474
DelayedTaskExecution myDelayedTaskExecution
Definition: simTaskManager.h:505
bool doTaskNotify
Definition: simTaskManager.h:499
#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:428
bool mySendSkipTaskMessages
Determines whether processSubordinateRemoved will send a skip task message. This should only be chang...
Definition: simTaskManager.h:432
boost::signals2::scoped_connection mySimObjectDeletedConnection
Definition: simTaskManager.h:473
AvailableSupportingTasks myAvailableSupportingTasks
Definition: simTaskManager.h:457
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:444
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:70
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:497
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:79
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:470
BackgroundProcesses myBackgroundProcesses
Definition: simTaskManager.h:467
std::map< int, SupportingTasks > AvailableSupportingTasks
Definition: simTaskManager.h:67
Definition: simInterfaceContent.h:45
DelayTaskExecution(const DelayTaskExecution &orig)
Definition: simTaskManager.h:488
std::map< DtSimTaskMessageType, DtTaskControllerComponent * > DtTaskProcessorMap
Definition: simTaskManager.h:422
virtual bool isPseudoAggregate() const
Indicates whether or not the type of task manager created supports pseudo-aggregates.
Definition: simTaskManager.h:234
bool doNotAbandonPlan
Definition: simTaskManager.h:501
BackgroundProcesses myScriptedSets
Definition: simTaskManager.h:468
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:500
DelayTaskExecution()
Definition: simTaskManager.h:478
bool myResumingTasks
Definition: simTaskManager.h:455
bool myFirstTick
Definition: simTaskManager.h:471
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