VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
disaggregatedPatrolAlongController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2004 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
12 #pragma once
13 
16 
17 class DtFormationState;
19 class DtAggregatePatrolAlongDescriptor;
20 class DtVrfObjectManager;
21 
38 {
39 public:
40 
42  {
43  DtMovingAlongRoute = 0,
44  DtReversingDirection = 1
45  };
46 
50  DtLocalObject* owner,
51  DtSimulationServices* simManager,
52  DtComponentDescriptor* desc = 0,
53  DtReaderWriterRegistry* parentRegistry = 0);
54 
57 
60  virtual const char* type() const;
61 
64  virtual bool init();
65 
67  virtual void tick();
68 
70  virtual void registerTaskMsgCallbacks();
71 
72  static void patrolAlongCallback(DtSimMessage* msg, void* usr, DtSimTaskStatePtr taskStatePtr);
73 
77 
82  static void taskCompleteReportCallback(DtSimMessage * msg, void * usr);
83 
87  static DtSimComponent * creator(const DtString& name,
88  DtLocalObject* owner,
89  DtSimulationServices* simManager,
90  DtComponentDescriptor* desc = 0,
91  DtReaderWriterRegistry* parentRegistry = 0);
92 
93 protected:
94  virtual void processPatrolAlong(const DtTaskMessage& msg, DtSimTaskStatePtr taskStatePtr);
95 
100  virtual void onTaskComplete(DtSimMessage * msg);
101 
107  virtual bool createPSR();
108 
116  virtual DtIteratorDirection initialTraversalDirection(
117  const DtUUID& route, const DtVector& initialWorldPosition) const;
118 
127  virtual void sendMoveAlongToSelf(const DtUUID& route,
128  enum DtIteratorDirection traversalDirection, bool startAtClosestPoint);
129 
130 private:
131 
134 
137 
138 protected:
139 
141  const DtAggregatePatrolAlongDescriptor* myAggregatePatrolAlongDescriptor;
142 
145 
149 
151 
153 };
154 
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
class DtLocalObjectManager:
Definition: localObjectManager.h:151
Definition: formationState.h:41
DtFormationState * myFormationState
Aggregate's formation state, cached in this class for convenience.
Definition: disaggregatedPatrolAlongController.h:144
virtual void registerTaskMsgCallbacks()
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
const DtAggregatePatrolAlongDescriptor * myAggregatePatrolAlongDescriptor
Descriptor used to configure this component.
Definition: disaggregatedPatrolAlongController.h:141
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()
DtDisaggregatedPatrolAlongController is a task controller responsible for executing DtPatrolAlongTask...
Definition: disaggregatedPatrolAlongController.h:37
DtBoost::shared_ptr< DtSimTaskState > DtSimTaskStatePtr
Definition: taskAndTaskStateDefines.h:18
DtIteratorDirection
Definition: iteratorBase.h:23
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
DtPatrolAlongState
Definition: disaggregatedPatrolAlongController.h:41
virtual DtSimTaskStatePtr currentTaskState() const
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
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
This is a process state repository for the DtAggregatePatrolAlongController that stores the list of t...
Definition: aggregatePatrolAlongPSR.h:14
DtAggregatePatrolAlongPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: disaggregatedPatrolAlongController.h:148
bool myFirstTick
Definition: disaggregatedPatrolAlongController.h:150
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
DtAggregateLocalObjectFacade myAggregateLocalObjectFacade
Definition: disaggregatedPatrolAlongController.h:152
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 Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)