VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
bombController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
12 #include <matrix/vlVector.h>
13 
14 class DtString;
15 class DtSimManager;
16 class DtVectorOutputPort;
17 class DtBombPSR;
18 class DtReflectedDesignator;
19 
32 {
33 public:
34 
37  DtBombController(const DtString& name,
38  DtVrfObject* owner,
39  DtSimManager* simManager,
40  DtComponentDescriptor* desc = 0,
41  DtReaderWriterRegistry* parentRegistry = 0);
42 
44  virtual ~DtBombController();
45 
52  virtual bool init();
53 
65  virtual void tick();
66 
69  virtual const char* type() const;
70 
74  static DtSimComponent * creator(const DtString& name, DtVrfObject* owner,
75  DtSimManager* simManager, DtComponentDescriptor* desc = 0,
76  DtReaderWriterRegistry* parentRegistry = 0);
77 
78 protected:
80  virtual bool createPorts();
81 
89  virtual void lookupAndCacheProcessSR();
90 
93  virtual bool postAddComponentsInit();
94 
99 
100  static void targetPointTaskCallback(DtSimMessage* msg, void* usrData);
101  virtual void processTargetPointTaskMessage(DtSimMessage* msg);
103 
108 
109  static void targetEntityTaskCallback(DtSimMessage* msg, void* usrData);
110  virtual void processTargetEntityTaskMessage(DtSimMessage* msg);
112 
117 
118  static void setLaserCodeCallback(DtSimMessage* msg, void* usrData);
119  virtual void processSetLaserCodeMessage(DtSimMessage* msg);
121 
125 
126  static void laserDesignatorRemovedCallback(
127  DtReflectedDesignator* designator, void* usr);
128  virtual void processLaserDesignatorRemoved(
129  DtReflectedDesignator* designator);
131 
134 
135  static void objectAboutToBeRemovedCallback(const DtVrfObject* object, void* usr);
136  virtual void processObjectAboutToBeRemoved(const DtVrfObject* object);
138 
139 private:
142 
145  orig);
146 
148  const DtBombController & operator=(const
149  DtBombController & orig);
150 
151 
152 protected:
156 
160 
163  DtReflectedDesignator* myLaserDesignator;
164 
167 
175 
177 
178 };
179 
DtVectorOutputPort * myTargetLocationPort
Output Port Name: target-location Output Port Description: current location of the target in local co...
Definition: bombController.h:174
#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
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
class DtBombPSR:
Definition: bombPSR.h:33
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:20
Provides the guidance model for a smart bomb.
Definition: bombController.h:31
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
Definition: readerWriterRegistry.h:39
virtual const char * type() const =0
Returns a string identifies the class type of component.
virtual bool init()
Calls setRadio()
DtBombPSR * myProcessState
Stores the current state of the controller which is saved out with the order of battle file...
Definition: bombController.h:155
Instances of DtVectorOutputPort are output ports through which data producers can send a DtVector...
Definition: vectorIOPort.h:52
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component.
DtReflectedDesignator * myLaserDesignator
Cached by tick, only applicable when in DtTrackLaserSpot mode.
Definition: bombController.h:163
virtual bool createPorts()
Called by init.
const DtVrfObject * myTargetObject
Cached by tick, only applicable when in DtTrackTarget mode.
Definition: bombController.h:159
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
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

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)