VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
indirectFireController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 
12 #pragma once
13 
15 
17 #include <vlpi/disEnums.h>
18 #include <matrix/vlVector.h>
19 
20 class DtString;
21 class DtSimManager;
22 class DtTaskMessage;
23 class DtSimMessage;
25 
30 
31 
38 {
39 
40 public:
41 
42  typedef std::list<DtIndirectWeaponComponentInterface*> DtIndirectWeaponInterfaceList;
43 
47  DtVrfObject* owner,
48  DtSimManager* simManager,
49  DtComponentDescriptor* desc = 0,
50  DtReaderWriterRegistry* parentRegistry = 0);
51 
53  virtual ~DtIndirectFireController();
54 
56  virtual bool init();
57 
60  virtual const char* type() const;
61 
63  virtual bool postAddComponentsInit();
64 
69  virtual void tick();
70 
73  virtual void clearTask();
74 
77  virtual bool isWeaponFireFinished(DtIndirectWeaponComponentInterface* weapIf);
78 
79  virtual void findWeaponControlInterfaces();
80 
82  virtual void setCurrentTargetLocation(const DtVector& location);
84  virtual const DtVector& currentTargetLocation();
85 
91  virtual void registerTaskMsgCallbacks();
92 
105 
106  static void indirectFireAtLocationTaskCallback(DtSimMessage* msg, void* usr);
107  virtual void processIndirectFireAtLocationTask(DtSimMessage* msg);
108 
109 
110  static void indirectFireAtTargetTaskCallback(DtSimMessage* msg, void* usr);
111  virtual void processIndirectFireAtTargetTask(DtSimMessage* msg);
113 
115  static void FFEOnTargetCallback(DtSimMessage * msg, void * usr);
117  static void FFEOnEntityCallback(DtSimMessage * msg, void * usr);
119  static void FFEOnLocationCallback(DtSimMessage * msg, void * usr);
121  static void userTaskCallback(DtSimMessage * msg, void * usr);
122 
129  virtual bool processFFEOnTargetTask(DtSimMessage * msg);
130  virtual bool processFFEOnLocationTask(DtSimMessage * msg);
131  virtual bool processFFEOnEntityTask(DtSimMessage * msg);
137  virtual void processUserTask(DtSimMessage * msg);
140  virtual void processFFETask(DtFireForEffectTask * task);
141 
143  static void fireCruiseMissileCallback(DtSimMessage * msg, void * usr);
144  virtual bool processFireCruiseMissileTask(DtSimMessage * msg);
145  virtual void processFireCruiseMissileTask(DtFireCruiseMissileTask * task);
146 
149 
150  static void weaponListRequestCallback(const DtVrfObjectMessage* msg, void* usr);
151  virtual void processWeaponListRequest(const DtVrfObjectMessage* msg);
153 
154  virtual void taskComplete(bool success = true);
155 
159  static DtSimComponent * creator(const DtString& name,
160  DtVrfObject* owner,
161  DtSimManager* simManager,
162  DtComponentDescriptor* desc = 0,
163  DtReaderWriterRegistry* parentRegistry = 0);
164 
165 protected:
169  void makeDisplayNamesUnique();
170 
176  virtual bool createPSR();
177 
178  virtual void clearTaskState(DtIndirectWeaponComponentInterface* weapIf);
179 
181  virtual void getOrientation(DtRwString *orientString,DtRwTaitBryan & orientation);
182 
185 
188 
191  orig);
192 
193 protected:
198 
202 
208 };
209 
UUID is a unique ID wrapper class.
Definition: rwUUID.h:222
DtFireCruiseMissileTask is a task message for launching cruise missiles.
Definition: fireCruiseMissileTask.h:22
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual bool postAddComponentsInit()
Called after all components have been created, initialized and added to the component manager...
Definition: simComponent.h:146
DtIndirectFireControllerPSR * myProcessState
Container for state data associated with this component.
Definition: indirectFireController.h:197
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
DtIndirectFireControllerPSR is a process state repository which holds state variables for the DtIndir...
Definition: indirectFireControllerPSR.h:18
virtual void registerTaskMsgCallbacks()
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:20
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.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
File: rwTaitBryan.h.
Definition: rwTaitBryan.h:24
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 taskComplete(bool success=true)
If we are currently tasked, this will cause us to notify the entity that we&#39;re done and delete the ta...
DtUUID myCurrentTarget
Definition: indirectFireController.h:206
virtual void clearTask()
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
DtIndirectFireController is responsible for processing the fire for effect tasks including fire for e...
Definition: indirectFireController.h:37
DtIndirectFireSupportControllerDescriptor * myFireSupportDescriptor
Descriptor to initialize this controller which controlls all the indirect fire weapons attached to th...
Definition: indirectFireController.h:205
std::list< DtIndirectWeaponComponentInterface * > DtIndirectWeaponInterfaceList
Definition: indirectFireController.h:42
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component.
DtIndirectWeaponInterfaceList myWeaponInterfaceList
List of weapon interfaces through which the indirect fire controller interfaces with the various indi...
Definition: indirectFireController.h:201
The base class for all messages to/from a specific DtVrfObject.
Definition: vrfObjectMessage.h:30
DtVector myCurrentTargetLocation
Definition: indirectFireController.h:207
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
Instances of DtIndirectFireSupportControllerDescriptor are used to specify the parameters for a DtAim...
Definition: indirectFireSupportControllerDescriptor.h:17
Represents the interface between the DtIndirectFireController and an indirect fire weapon system...
Definition: indirectWeaponComponentInterface.h:24
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:103
DtFireForEffectTask is an abstract base class which used to create fire for effect tasks that differ ...
Definition: fireForEffectTask.h:51
A DtTaskMsg is a DtRadioMsg with a pointer to a task.
Definition: taskMessage.h:19

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)