class DtVrfObjectPlanManager:
The DtVrfObjectPlanManager handles the DtPlan for a DtLocalObject. It is ticked by the DtLocalObject and forwards the tick on to the plan. It serves as the interface between a DtPlan and the DtPlanExecutor which will carry out its statements. It also responds to commands from the DtVrfRemoteController which get forwarded from the DtPlanAdministrator to set, monitor and abandon plans.
- See Also
- Plan Manager
- Related Examples
-
| DtVrfObjectPlanManager::DtVrfObjectPlanManager |
( |
DtLocalObject * |
vrfObject | ) |
|
| virtual DtVrfObjectPlanManager::~DtVrfObjectPlanManager |
( |
| ) |
|
|
virtual |
| DtVrfObjectPlanManager::DtVrfObjectPlanManager |
( |
| ) |
|
|
protected |
default constructor; not implemented
copy constructor; not implemented
| virtual bool DtVrfObjectPlanManager::init |
( |
| ) |
|
|
virtual |
| virtual void DtVrfObjectPlanManager::tick |
( |
| ) |
|
|
virtual |
If myPlanQueuedForAbandonment the plan is abandoned, otherwise the plan is ticked.
| virtual DtPlanExecutor* DtVrfObjectPlanManager::createPlanExecutor |
( |
| ) |
|
|
virtual |
Returns a newly created DtVrfSimPlanExecutor. The caller is responsible for ownership of the pointer.
| virtual DtPlan* DtVrfObjectPlanManager::createAndInitPlan |
( |
| ) |
|
|
virtual |
Returns a newly created DtPlan Creates and initializes a new, empty DtPlan object and then initializes it. The caller is responsible for ownership of the pointer. Overriding this function allows an alternate subclass of DtPlan to be created.
| virtual DtPlan* DtVrfObjectPlanManager::plan |
( |
| ) |
|
|
virtual |
| virtual DtPlan* DtVrfObjectPlanManager::getOrCreatePlan |
( |
| ) |
|
|
virtual |
If there is no plan creates and returns. Different than plan() in that plan() does not create a plan if it is missing.
| virtual DtPlan* DtVrfObjectPlanManager::nextFramePlan |
( |
| ) |
|
|
virtual |
If there is a plan queued for replacement, returns that plan, else returns the current plan.
| virtual void DtVrfObjectPlanManager::setPlan |
( |
DtPlan * |
plan, |
|
|
bool |
abandonCurrentPlan = true |
|
) |
| |
|
virtual |
Sets myPlan. Deletes any existing plan. Sets the plan's executor to myPlanExecutor. Sets the plan's object name to the myVrfObject's name.
If there is a current plan, abandon it immediate, else, let the current plans current task continue to execute until the new plan executes a task
| virtual bool DtVrfObjectPlanManager::sendPlan |
( |
| ) |
|
|
virtual |
Sends the plan using a DtIfPlan message. Plans are sent to the broadcast address, DtSimSendToAll. If no plan exists yet, createAndInitPlan will be called to make one.
| virtual bool DtVrfObjectPlanManager::sendPlanStatement |
( |
int |
statementId, |
|
|
const DtSimulationAddress & |
address |
|
) |
| const |
|
virtual |
Sends the statement corresponding to the given ID from the plan to the given recipient using a DtIfPlanStatement message.
| virtual void DtVrfObjectPlanManager::setTaskIssuedFromPlan |
( |
bool |
taskIssuedFromPlan | ) |
|
|
virtual |
Sets myTaskIssuedFromPlan.
| virtual void DtVrfObjectPlanManager::taskExecuted |
( |
const DtTaskMessage & |
msg, |
|
|
bool |
abandonPlan = true |
|
) |
| |
|
virtual |
Called by DtSimTaskManager::executeTask when a task is executed. If the task was issued by an aggregate (meaning the task does not have the independently tasked flag set) it is ignored. Subtasks are also ignored. For all other tasks if myTaskIssuedFromPlan is false and myPlan exists, myPlanQueuedForAbandonment is set to true to abandon the plan on the next tick. This happens when a task is issued from the GUI or from a global plan. Finally, myTaskIssuedFromPlan is reset to false.
If abandonPlan is true (the default) will abandon plan due to task executing. If abandonPlan is false, will not abandon plan, assuming that the task being issued is from a controller that knows to continue the plan after task executing is complete
| virtual void DtVrfObjectPlanManager::processSetPlan |
( |
DtSimMessage * |
msg | ) |
|
|
virtual |
| virtual void DtVrfObjectPlanManager::processSetPlan |
( |
DtIfPlan * |
msgData | ) |
|
|
virtual |
| virtual void DtVrfObjectPlanManager::prepareForReinitialization |
( |
| ) |
|
|
virtual |
Prepares for reinitialization by restarting plan (without giving a wait task or making independently tasked)
| virtual void DtVrfObjectPlanManager::processRequestPlan |
( |
const DtSimMessage * |
msg | ) |
|
|
virtual |
| virtual void DtVrfObjectPlanManager::processAbandonPlan |
( |
DtSimMessage * |
msg | ) |
|
|
virtual |
| virtual void DtVrfObjectPlanManager::processRestartPlan |
( |
DtSimMessage * |
msg | ) |
|
|
virtual |
| virtual void DtVrfObjectPlanManager::restartPlan |
( |
| ) |
|
|
virtual |
| static void DtVrfObjectPlanManager::currentStatementChangedCallback |
( |
const DtPlan & |
plan, |
|
|
void * |
usrData |
|
) |
| |
|
static |
Callback registered with plans for notification when the current statement changes.
| virtual void DtVrfObjectPlanManager::processCurrentStatementChanged |
( |
const DtPlan & |
plan | ) |
|
|
virtual |
Processes the current statement change by sending a DtIfPlanCurStatement message.
| virtual bool DtVrfObjectPlanManager::hasPlan |
( |
| ) |
const |
|
virtual |
Returns true if there is a plan associated with this plan manger. A plan being defined as a non-null myPlan pointer that as plan statements within it (i.e. not an empty plan)
| virtual bool DtVrfObjectPlanManager::isGlobalPlan |
( |
| ) |
const |
|
virtual |
Returns true if the plan represents a global plan.
| virtual bool DtVrfObjectPlanManager::executingPlan |
( |
| ) |
const |
|
virtual |
- Returns
- True if there is currently a plan that is being executed.
| virtual void DtVrfObjectPlanManager::notifyTaskCompletion |
( |
int |
taskId | ) |
|
|
virtual |
Call this to indicate that a task has been completed, and specify the task execution ID.
| virtual void DtVrfObjectPlanManager::notifySkipTask |
( |
| ) |
|
|
virtual |
Call this to indicate that a task has been skipped.
| virtual bool DtVrfObjectPlanManager::taskAbandonsPlan |
( |
const DtTaskMessage & |
tskMsg | ) |
const |
|
virtual |
Returns false if this task execution can let the plan continue to run. A task will not abandon a plan if:
- It is in the task rules as a non-plan-interruptable-tasks
- It is a scripted task that can be executed concurrently and is not part of any task group
assignment operator; not implemented
| DtPlan* DtVrfObjectPlanManager::myPlan |
|
protected |
| bool DtVrfObjectPlanManager::myTaskIssuedFromPlan |
|
protected |
| bool DtVrfObjectPlanManager::myPlanQueuedForAbandonment |
|
protected |
| bool DtVrfObjectPlanManager::myIsRegisteredForCallback |
|
protected |
This factory is allocated and destroyed by the DtVrfCreator.
| DtPlan* DtVrfObjectPlanManager::myPendingReplacementPlan = nullptr |
|
protected |
The documentation for this class was generated from the following file: