VR-Forces 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 
56  virtual ~DtDisaggregatedPatrolAlongController() override;
57 
60  virtual const char* type() const override;
61 
64  virtual bool init() override;
65 
66  virtual void preFirstTickInit() override;
67 
69  virtual void tick() override;
70 
72  virtual void registerTaskMsgCallbacks() override;
73 
74  static void patrolAlongCallback(DtSimMessage* msg, void* usr, DtSimTaskStatePtr taskStatePtr);
75 
78  virtual DtSimTaskStatePtr currentTaskState() const override;
79 
84  static void taskCompleteReportCallback(DtSimMessage * msg, void * usr);
85 
89  static DtSimComponent * creator(const DtString& name,
90  DtLocalObject* owner,
91  DtSimulationServices* simManager,
92  DtComponentDescriptor* desc = 0,
93  DtReaderWriterRegistry* parentRegistry = 0);
94 
95 protected:
96  virtual void processPatrolAlong(const DtTaskMessage& msg, DtSimTaskStatePtr taskStatePtr);
97 
102  virtual void onTaskComplete(DtSimMessage * msg);
103 
109  virtual bool createPSR();
110 
118  virtual DtIteratorDirection initialTraversalDirection(
119  const DtUUID& route, const DtVector& initialWorldPosition) const;
120 
129  virtual void sendMoveAlongToSelf(const DtUUID& route,
130  enum DtIteratorDirection traversalDirection, bool startAtClosestPoint);
131 
132 private:
133 
136 
139 
140 protected:
141 
143  const DtAggregatePatrolAlongDescriptor* myAggregatePatrolAlongDescriptor;
144 
147 
151 
153 };
154 
UUID is a unique ID wrapper class.
Definition: uuid.h:59
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
class DtLocalObjectManager:
Definition: localObjectManager.h:157
Definition: formationState.h:40
DtFormationState * myFormationState
Aggregate's formation state, cached in this class for convenience.
Definition: disaggregatedPatrolAlongController.h:146
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
virtual void registerTaskMsgCallbacks()
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:22
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:143
Definition: readerWriterRegistry.h:39
std::shared_ptr< DtSimTaskState > DtSimTaskStatePtr
Definition: taskAndTaskStateDefines.h:18
DtDisaggregatedPatrolAlongController is a task controller responsible for executing DtPatrolAlongTask...
Definition: disaggregatedPatrolAlongController.h:37
virtual bool init() override
Calls setRadio()
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:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
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: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.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)