VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
munitionLaunchController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2022 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
19 
20 class DtIfPlan;
24 
47 
50 {
51 private:
58 
59 public:
60 
64  DtSimulationServices* simManager, DtComponentDescriptor* compDesc = 0,
65  DtReaderWriterRegistry* parentRegistry = 0);
66 
68  virtual ~DtMunitionLaunchController() override;
69 
72  virtual const char* type() const override;
73 
76  virtual bool init() override;
77 
79  virtual void setComponentDescriptor(DtComponentDescriptor* compDesc) override;
80 
86  virtual bool createPSR();
87 
94  virtual void tick() override;
95 
99  static DtSimComponent * creator(const DtString& name,
100  DtLocalObject* owner,
101  DtSimulationServices* simManager,
102  DtComponentDescriptor* desc = 0,
103  DtReaderWriterRegistry* parentRegistry = 0);
104 
108  virtual DtCruiseMissileLaunchControllerPSR* getPsr();
109  virtual DtCruiseMissileLaunchControllerDescriptor* getDescriptor();
111 
115  virtual void registerAttributeFunctions() override;
116 
120  static DtReaderWriter* provideMunitionName(void* controller);
121 
125  static DtReaderWriter* provideTargetHitZoneOffset(void* controller);
126 
130  static bool launchMunition(void* controller, DtReaderWriter* dummy);
131 
135  static bool targetHitZoneFunction(void* controller, DtReaderWriter* dummy);
136 
140  static bool cancelLaunch(void* controller, DtReaderWriter* dummy);
141 
143 
144 protected:
146  virtual DtReaderWriter* processProvideMunitionName();
147 
150  virtual DtReaderWriter* processProvideTargetHitZoneOffset();
151 
156  virtual bool processLaunchMunition(DtReaderWriter* dummy);
157 
163  virtual bool processTargetHitZoneFunction(DtReaderWriter* dummy);
164 
168  virtual bool processCancelLaunch();
169 
172  virtual bool munitionResourceAvailable() const;
173 
175  virtual void consumeMunitionResource();
176 
180  virtual DtCreateObjectHandle createMunitionObject(const DtString& eventId, DtVector& launcherGeocPos, DtVector& missileNetInitialGeocVelocity);
181 
190  virtual DtSetWarheadInfo createWarheadInfo(DtVrfLocalObjectCreateInformation& info, const DtString& eventId) const;
191 
195  virtual DtIfPlan createMunitionPlan(const DtUUID& munition);
196 
200  virtual DtUUID getTargetFromTaskMessage(const DtTaskMessage *tm) const;
201 
204  virtual void createAndSendFireInteraction(const DtCreateObjectHandle& munition,
205  const DtString& eventId, const DtVector& launcherGeocPos, const DtVector& missileNetInitialGeocVelocity);
206 
208  virtual void addRangeItems();
209 
210  virtual void clearTask() override;
211 
212 protected:
215 
219 
222 
224 
228 };
229 
class DtIfPlan:
Definition: ifPlan.h:61
UUID is a unique ID wrapper class.
Definition: uuid.h:59
class DtCruiseMissileLaunchControllerPSR:
Definition: cruiseMissileLaunchControllerPSR.h:25
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtCruiseMissileLaunchControllerDescriptor; descriptor for the DtCruiseMissileLaunchController compone...
Definition: cruiseMissileLaunchControllerDescriptor.h:26
bool myRangeItemsAdded
Definition: munitionLaunchController.h:223
Handle returned from Create Object Service calls.
Definition: createObjectHandle.h:12
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
DtRwUUID myTargetName
Temporary.
Definition: munitionLaunchController.h:221
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:22
Definition: readerWriter.h:85
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
The DtLocalObjectCreateInformation class is a subset of the information used in the DtIfCreateVrfObje...
Definition: vrfLocalObjectCreateInformation.h:26
Description: Readable, Writable uuid string. Use this class in order to convert from object marking t...
Definition: rwUUID.h:25
virtual bool init() override
Calls setRadio()
virtual void setComponentDescriptor(DtComponentDescriptor *componentDescriptor)
The component descriptor specified in the order of battle file or parameter file that was used to cre...
DtMunitionLaunchController models launch of a munition.
Definition: munitionLaunchController.h:49
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation frame...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:97
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Member to allow for access to platform specific data.
Definition: munitionLaunchController.h:226
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtCruiseMissileLaunchControllerPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: munitionLaunchController.h:218
virtual void clearTask() override
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
virtual void registerAttributeFunctions()
Called to register functions that provide system attribute values. Called by init(). Empty in this class. Overridden in different components to add attribute provider functions.
Definition: simComponent.h:132
DtCruiseMissileLaunchControllerDescriptor * myDescriptor
Pointer to my descriptor.
Definition: munitionLaunchController.h:214
DtMovementLocalObjectFacade myMovementLocalObjectFacade
Definition: munitionLaunchController.h:227
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
File: setWarheadInfo.h.
Definition: setWarheadInfo.h:40
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)