VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
releaseBombController.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 
13 
14 class DtLaserLauncherPSR;
15 class DtReflectedDesignator;
16 class DtSimMessage;
17 class DtReleaseBombTask;
18 
19 namespace makVrf
20 {
21  class DtLaserDesignatorStateComponent;
22 }
23 
30 {
31 private:
38 
39 public:
40 
44  DtSimulationServices* simManager, DtComponentDescriptor* compDesc = 0,
45  DtReaderWriterRegistry* parentRegistry = 0);
46 
49  virtual ~DtReleaseBombController();
50 
53  virtual const char* type() const;
54 
63  virtual bool init();
64 
71  virtual bool createPSR();
72 
76  virtual void preFirstTickInit();
77 
87  virtual void tick();
88 
92  static DtSimComponent * creator(const DtString& name,
93  DtLocalObject* owner,
94  DtSimulationServices* simManager,
95  DtComponentDescriptor* desc = 0,
96  DtReaderWriterRegistry* parentRegistry = 0);
97 
98 protected:
100  virtual DtUUID createBombObject(const DtEntityType& type);
101 
103  virtual void completeBombSetup(const DtSimObjectReference& bomb);
104 
113  virtual void targetBomb(const DtSimObjectReference& object, const DtReleaseBombTask* task,
114  DtUUID& targetIdOut, DtVector targetLocationOut);
115 
121  virtual void configureWarhead(const DtSimObjectReference& bomb, const DtString& eventId,
122  const DtReleaseBombTask* task);
123 
127  virtual bool targetDesginatorValid(const makVrf::DtLaserDesignatorStateComponent& target) const;
128 
132  virtual const makVrf::DtLaserDesignatorStateComponent* lookupDesignator() const;
133 
136  virtual int defaultLaserCode() const;
137 
140 
141  static void setSyncLaserCodeCallback(DtSimMessage* msg, void* usr);
142  virtual void processSetSyncLaserCode(DtSimMessage* msg);
144 
147 
148  static void setLaserCodeRequestCallback(DtSimMessage* msg, void* usrData);
149  virtual void processSetLaserCodeRequestMessage(DtSimMessage* msg);
151 
156  virtual void createAndSendFireInteraction(const DtSimObject* bomb,
157  const DtString& eventId, const DtUUID& targetObjectId,
158  const DtVector& targetLocation);
159 
160 protected:
164 
165  //TODO: move to PSR:
167 };
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtReleaseBombTask is the base class for all the other release bomb tasks. It is never used to launch ...
Definition: releaseBombTask.h:19
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
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
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...
Responds to release bomb tasks. This controller processes DtReleaseBombOnTarget, DtReleaseBombOnLocat...
Definition: releaseBombController.h:28
DtUUID myObjectPendingCreation
Definition: releaseBombController.h:166
virtual bool init()
Calls setRadio()
DtLaserLauncherPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: releaseBombController.h:163
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
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 ...
File: laserLauncherPSR.h.
Definition: laserLauncherPSR.h:33
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:79
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
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 Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)