VR-Forces 5.0.1 Developer's Guide
 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 #include <boost/signals2.hpp>
14 
15 class DtString;
17 class DtVectorOutputPort;
18 class DtBombPSR;
19 
20 namespace makVrf
21 {
22  class DtLaserDesignatorStateComponent;
23  class DtFrameStateInterface;
24 }
25 
38 {
39 public:
40 
43  DtBombController(const DtString& name,
44  DtLocalObject* owner,
45  DtSimulationServices* simManager,
46  DtComponentDescriptor* desc = 0,
47  DtReaderWriterRegistry* parentRegistry = 0);
48 
50  virtual ~DtBombController();
51 
57  virtual bool init();
58 
70  virtual void tick();
71 
74  virtual const char* type() const;
75 
79  static DtSimComponent * creator(const DtString& name, DtLocalObject* owner,
80  DtSimulationServices* simManager, DtComponentDescriptor* desc = 0,
81  DtReaderWriterRegistry* parentRegistry = 0);
82 
83 protected:
85  virtual bool createPorts();
86 
94  virtual void lookupAndCacheProcessSR();
95 
98  virtual bool postAddComponentsInit();
99 
104 
105  static void targetPointTaskCallback(DtSimMessage* msg, void* usrData);
106  virtual void processTargetPointTaskMessage(DtSimMessage* msg);
108 
113 
114  static void targetEntityTaskCallback(DtSimMessage* msg, void* usrData);
115  virtual void processTargetEntityTaskMessage(DtSimMessage* msg);
117 
122 
123  static void setLaserCodeCallback(DtSimMessage* msg, void* usrData);
124  virtual void processSetLaserCodeMessage(DtSimMessage* msg);
126 
130 
131  virtual void processLaserDesignatorRemoved(const makVrf::DtFrameStateInterface*);
133 
134 private:
137 
140  orig);
141 
143  const DtBombController & operator=(const
144  DtBombController & orig);
145 
146 
147 protected:
151 
155 
159  boost::signals2::scoped_connection myLaserDesignatorRemovedConnection;
160 
163 
171 
173 
174 };
175 
DtVectorOutputPort * myTargetLocationPort
Output Port Name: target-location Output Port Description: current location of the target in local co...
Definition: bombController.h:170
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
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
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
Provides the guidance model for a smart bomb.
Definition: bombController.h:37
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
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()
DtSimObjectReference myTargetObject
Cached by tick, only applicable when in DtTrackTarget mode. Will be set to 0 by processObjectAboutToB...
Definition: bombController.h:154
const makVrf::DtLaserDesignatorStateComponent * myLaserDesignator
Cached by tick, only applicable when in DtTrackLaserSpot mode. Will be set to 0 by processLaserDesign...
Definition: bombController.h:158
DtBombPSR * myProcessState
Stores the current state of the controller which is saved out with the order of battle file...
Definition: bombController.h:150
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: laserDesignatorStateComponent.h:56
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. The component is ticked once each simulation from ...
boost::signals2::scoped_connection myLaserDesignatorRemovedConnection
Definition: bombController.h:159
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
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
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
virtual bool postAddComponentsInit()
Calls enableTaskTypes()
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:282
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)