VR-Forces 4.8 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 
29 
30 
37 {
38 
39 public:
40 
41  typedef std::list<DtIndirectWeaponComponentInterface*> DtIndirectWeaponInterfaceList;
42 
46  DtVrfObject* owner,
47  DtSimManager* simManager,
48  DtComponentDescriptor* desc = 0,
49  DtReaderWriterRegistry* parentRegistry = 0);
50 
52  virtual ~DtIndirectFireController();
53 
55  virtual bool init();
56 
59  virtual const char* type() const;
60 
62  virtual bool postAddComponentsInit();
63 
68  virtual void tick();
69 
72  virtual void clearTask();
73 
76  virtual bool isWeaponFireFinished(DtIndirectWeaponComponentInterface* weapIf);
77 
78  virtual void findWeaponControlInterfaces();
79 
81  virtual void setCurrentTargetLocation(const DtVector& location);
83  virtual const DtVector& currentTargetLocation();
84 
90  virtual void registerTaskMsgCallbacks();
91 
104 
105  static void indirectFireAtLocationTaskCallback(DtSimMessage* msg, void* usr);
106  virtual void processIndirectFireAtLocationTask(DtSimMessage* msg);
107 
108  static void indirectFireAtTargetTaskCallback(DtSimMessage* msg, void* usr);
109  virtual void processIndirectFireAtTargetTask(DtSimMessage* msg);
111 
113  static void FFEOnTargetCallback(DtSimMessage * msg, void * usr);
115  static void FFEOnEntityCallback(DtSimMessage * msg, void * usr);
117  static void FFEOnLocationCallback(DtSimMessage * msg, void * usr);
119  static void userTaskCallback(DtSimMessage * msg, void * usr);
120 
127  virtual bool processFFEOnTargetTask(DtSimMessage * msg);
128  virtual bool processFFEOnLocationTask(DtSimMessage * msg);
129  virtual bool processFFEOnEntityTask(DtSimMessage * msg);
135  virtual void processUserTask(DtSimMessage * msg);
138  virtual void processFFETask(DtFireForEffectTask * task);
139 
142 
143  static void weaponListRequestCallback(const DtVrfObjectMessage* msg, void* usr);
144  virtual void processWeaponListRequest(const DtVrfObjectMessage* msg);
146 
147  virtual void taskComplete(bool success = true);
148 
152  static DtSimComponent * creator(const DtString& name,
153  DtVrfObject* owner,
154  DtSimManager* simManager,
155  DtComponentDescriptor* desc = 0,
156  DtReaderWriterRegistry* parentRegistry = 0);
157 
158 protected:
162  void makeDisplayNamesUnique();
163 
169  virtual bool createPSR();
170 
171  virtual void clearTaskState(DtIndirectWeaponComponentInterface* weapIf);
172 
174  virtual void getOrientation(DtRwString *orientString,DtRwTaitBryan & orientation);
175 
178 
181 
184  orig);
185 
186 protected:
191 
195 
201 };
202 
UUID is a unique ID wrapper class.
Definition: rwUUID.h:222
#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:144
DtIndirectFireControllerPSR * myProcessState
Container for state data associated with this component.
Definition: indirectFireController.h:190
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:199
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:36
DtIndirectFireSupportControllerDescriptor * myFireSupportDescriptor
Descriptor to initialize this controller which controlls all the indirect fire weapons attached to th...
Definition: indirectFireController.h:198
std::list< DtIndirectWeaponComponentInterface * > DtIndirectWeaponInterfaceList
Definition: indirectFireController.h:41
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:194
The base class for all messages to/from a specific DtVrfObject.
Definition: vrfObjectMessage.h:30
DtVector myCurrentTargetLocation
Definition: indirectFireController.h:200
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:102
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 Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)