VR-Forces 5.0.1 Developer's Guide
 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 
15 
16 
17 #pragma once
18 
20 
22 #include <vlpi/disEnums.h>
23 #include <matrix/vlVector.h>
24 
25 class DtString;
27 class DtTaskMessage;
28 class DtSimMessage;
30 
35 
36 
43 {
44 
45 public:
46 
47  typedef std::list<DtIndirectWeaponComponentInterface*> DtIndirectWeaponInterfaceList;
48 
52  DtLocalObject* owner,
53  DtSimulationServices* simManager,
54  DtComponentDescriptor* desc = 0,
55  DtReaderWriterRegistry* parentRegistry = 0);
56 
58  virtual ~DtIndirectFireController();
59 
61  virtual bool init();
62 
65  virtual const char* type() const;
66 
68  virtual bool postAddComponentsInit();
69 
74  virtual void tick();
75 
78  virtual void clearTask();
79 
82  virtual bool isWeaponFireFinished(DtIndirectWeaponComponentInterface* weapIf);
83 
84  virtual void findWeaponControlInterfaces();
85 
87  virtual void setCurrentTargetLocation(const DtVector& location);
89  virtual const DtVector& currentTargetLocation();
90 
96  virtual void registerTaskMsgCallbacks();
97 
110 
111  static void indirectFireAtLocationTaskCallback(DtSimMessage* msg, void* usr);
112  virtual void processIndirectFireAtLocationTask(DtSimMessage* msg);
113 
114 
115  static void indirectFireAtTargetTaskCallback(DtSimMessage* msg, void* usr);
116  virtual void processIndirectFireAtTargetTask(DtSimMessage* msg);
118 
120  static void FFEOnTargetCallback(DtSimMessage * msg, void * usr);
122  static void FFEOnEntityCallback(DtSimMessage * msg, void * usr);
124  static void FFEOnLocationCallback(DtSimMessage * msg, void * usr);
126  static void userTaskCallback(DtSimMessage * msg, void * usr);
127 
134  virtual bool processFFEOnTargetTask(DtSimMessage * msg);
135  virtual bool processFFEOnLocationTask(DtSimMessage * msg);
136  virtual bool processFFEOnEntityTask(DtSimMessage * msg);
142  virtual void processUserTask(DtSimMessage * msg);
145  virtual void processFFETask(DtFireForEffectTask * task);
146 
148  static void fireCruiseMissileCallback(DtSimMessage * msg, void * usr);
149  virtual bool processFireCruiseMissileTask(DtSimMessage * msg);
150  virtual void processFireCruiseMissileTask(DtFireCruiseMissileTask * task);
151 
154 
155  static void weaponListRequestCallback(const DtVrfObjectMessage* msg, void* usr);
156  virtual void processWeaponListRequest(const DtVrfObjectMessage* msg);
158 
159  virtual void taskComplete(bool success = true);
160 
164  static DtSimComponent * creator(const DtString& name,
165  DtLocalObject* owner,
166  DtSimulationServices* simManager,
167  DtComponentDescriptor* desc = 0,
168  DtReaderWriterRegistry* parentRegistry = 0);
169 
170 protected:
174  void makeDisplayNamesUnique();
175 
181  virtual bool createPSR();
182 
183  virtual void clearTaskState(DtIndirectWeaponComponentInterface* weapIf);
184 
186  virtual void getOrientation(DtRwString *orientString,DtRwTaitBryan & orientation);
187 
190 
193 
196  orig);
197 
198 protected:
203 
207 
213 };
214 
UUID is a unique ID wrapper class.
Definition: rwUUID.h:226
DtFireCruiseMissileTask is a task message for launching cruise missiles. It contains a target object...
Definition: fireCruiseMissileTask.h:22
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtIndirectFireControllerPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: indirectFireController.h:202
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:49
Description: Readable, Writable DtTaitBryan.
Definition: rwTaitBryan.h:20
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 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:211
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:42
DtIndirectFireSupportControllerDescriptor * myFireSupportDescriptor
Descriptor to initialize this controller which controlls all the indirect fire weapons attached to th...
Definition: indirectFireController.h:210
std::list< DtIndirectWeaponComponentInterface * > DtIndirectWeaponInterfaceList
Definition: indirectFireController.h:47
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 ...
DtIndirectWeaponInterfaceList myWeaponInterfaceList
List of weapon interfaces through which the indirect fire controller interfaces with the various indi...
Definition: indirectFireController.h:206
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
DtVector myCurrentTargetLocation
Definition: indirectFireController.h:212
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:89
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
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
virtual bool postAddComponentsInit()
Calls enableTaskTypes()
File: fireForEff.h.
Definition: fireForEffectTask.h:32
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
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 Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)