VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
disaggregatedMoveToLocationController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2004 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
12 
13 #pragma once
14 
16 #include <vector>
17 
18 class DtSimMessage;
21 
39 {
40 public:
41 
43  {
44  DtImplementAsMoveIntoFormation = 0,
45  DtImplementAsMoveAlongRoute
46  } DtSubtaskImplementation;
47 
51  DtVrfObject* owner,
52  DtSimManager* simManager,
53  DtComponentDescriptor* desc = 0,
54  DtReaderWriterRegistry* parentRegistry = 0);
55 
57 
60  virtual const char* type() const;
61 
63  virtual bool init();
64 
66  virtual void clearTask();
67 
70  static void moveToLocationTaskCallback(DtSimMessage * msg, void * usr);
71 
74  static void taskCompleteReportCallback(DtSimMessage * msg, void * usr);
75 
79  static DtSimComponent * creator(const DtString& name,
80  DtVrfObject* owner,
81  DtSimManager* simManager,
82  DtComponentDescriptor* desc = 0,
83  DtReaderWriterRegistry* parentRegistry = 0);
84 
85 protected:
86 
89  virtual void registerTaskMsgCallbacks();
90 
96  virtual bool createPSR();
97 
101  virtual void onMoveToLocationTask(DtSimMessage * msg);
102 
106  virtual void onTaskComplete(DtSimMessage * msg);
107 
115  DtSubtaskImplementation chooseSubtaskImplementation(
116  const DtVector& geocDestination) const;
117 
124  virtual void moveIntoFormation(const DtVector& geocDestination);
125 
131  void moveAlongRoute(const DtVector& geocDestination);
132 
140  virtual bool calcRouteStartingPoint(const DtVector& geocEndPoint,
141  DtVector& geocStartPoint) const;
142 
145  virtual DtString generateWorkingRouteName() const;
146 
149  virtual bool publishFormationRoutes() const;
150 
151 private:
152 
156 
160 
161 protected:
162 
166 
170 
174  mutable bool myToggleGeneratedName;
175 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
DtAggregateMoveToLocationPSR * myProcessState
Container for state data associated with this component.
Definition: disaggregatedMoveToLocationController.h:169
virtual void registerTaskMsgCallbacks()
DtSubtaskImplementation
Definition: disaggregatedMoveToLocationController.h:42
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:20
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
DtVrfAggregateStateRepository * myAggregateStateRepository
Pointer to aggregate&#39;s state repository, cached in this class for convenience.
Definition: disaggregatedMoveToLocationController.h:165
Definition: readerWriterRegistry.h:39
virtual const char * type() const =0
Returns a string identifies the class type of component.
virtual bool init()
Calls setRadio()
virtual void clearTask()
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
bool myToggleGeneratedName
Flag used to toggle between 2 generated route names (&lt;object name&gt;=&quot;&quot;&gt;_L1 and &lt;object name&gt;=&quot;&quot;&gt;_L2)...
Definition: disaggregatedMoveToLocationController.h:174
File: simMsg.h.
Definition: simMessage.h:35
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
Contains the declaration of class DtAggregateMoveToLocationPSR, the process state repository used by ...
Definition: aggregateMoveToLocationPSR.h:25
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102
DtAggregateMoveToLocationController is a task controller responsible for executing DtMoveToLocationTa...
Definition: disaggregatedMoveToLocationController.h:38
Definition: vrfAggregateStateRepository.h:22

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)