VR-Forces 5.0.2 Developer's Guide
 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 
17 #include <vector>
18 
19 class DtSimMessage;
22 
40 {
41 public:
42 
44  {
45  DtImplementAsMoveIntoFormation = 0,
46  DtImplementAsMoveAlongRoute
47  } DtSubtaskImplementation;
48 
52  DtLocalObject* owner,
53  DtSimulationServices* simManager,
54  DtComponentDescriptor* desc = 0,
55  DtReaderWriterRegistry* parentRegistry = 0);
56 
58 
61  virtual const char* type() const;
62 
64  virtual bool init();
65 
67  virtual void clearTask();
68 
71  static void moveToLocationTaskCallback(DtSimMessage * msg, void * usr);
72 
75  static void taskCompleteReportCallback(DtSimMessage * msg, void * usr);
76 
80  static DtSimComponent * creator(const DtString& name,
81  DtLocalObject* owner,
82  DtSimulationServices* simManager,
83  DtComponentDescriptor* desc = 0,
84  DtReaderWriterRegistry* parentRegistry = 0);
85 
86 protected:
87 
90  virtual void registerTaskMsgCallbacks();
91 
97  virtual bool createPSR();
98 
102  virtual void onMoveToLocationTask(DtSimMessage * msg);
103 
107  virtual void onTaskComplete(DtSimMessage * msg);
108 
116  DtSubtaskImplementation chooseSubtaskImplementation(
117  const DtVector& geocDestination) const;
118 
125  virtual void moveIntoFormation(const DtVector& geocDestination);
126 
132  void moveAlongRoute(const DtVector& geocDestination);
133 
141  virtual bool calcRouteStartingPoint(const DtVector& geocEndPoint,
142  DtVector& geocStartPoint) const;
143 
146  virtual DtString generateWorkingRouteName() const;
147 
150  virtual bool publishFormationRoutes() const;
151 
152 private:
153 
157 
161 
162 protected:
163 
167 
171 
175  mutable bool myToggleGeneratedName;
176 
178 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtAggregateMoveToLocationPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: disaggregatedMoveToLocationController.h:170
virtual void registerTaskMsgCallbacks()
DtSubtaskImplementation
Definition: disaggregatedMoveToLocationController.h:43
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:49
DtAggregateLocalObjectFacade myAggregateLocalObjectFacade
Definition: disaggregatedMoveToLocationController.h:177
DtVrfAggregateStateRepository * myAggregateStateRepository
Pointer to aggregate&#39;s state repository, cached in this class for convenience.
Definition: disaggregatedMoveToLocationController.h:166
Definition: readerWriterRegistry.h:39
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
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:175
File: simMsg.h.
Definition: simMessage.h:35
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
Contains the declaration of class DtAggregateMoveToLocationPSR, the process state repository used by ...
Definition: aggregateMoveToLocationPSR.h:25
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtAggregateMoveToLocationController is a task controller responsible for executing DtMoveToLocationTa...
Definition: disaggregatedMoveToLocationController.h:39
Definition: vrfAggregateStateRepository.h:20
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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)