VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
launchExpendableResourceController.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 
16 #include "vlutil/vlString.h"
17 
21 class DtMunitionResource;
22 
29 {
30 public:
33  DtSimulationServices * simManager, DtComponentDescriptor* desc = NULL,
34  DtReaderWriterRegistry * parentRegistry = 0);
35 
38 
41 
44 
47  virtual const char* type() const;
48 
50  virtual void registerTaskMsgCallbacks();
51 
52  static void setAutoLaunchEnabledCallback(DtSimMessage * msg, void * usr);
53 
54  static void launchCallback(DtSimMessage* msg, void* usr, DtSimTaskStatePtr taskStatePtr);
55 
56  virtual DtSimTaskStatePtr currentTaskState() const;
57 
60  virtual void processSetAutoLaunchEnabled(DtSimMessage* msg);
61 
64  virtual bool init();
65 
68  virtual bool postAddComponentsInit();
69 
73  virtual void preFirstTickInit();
74 
77  virtual void tick();
78 
80  virtual void taskComplete(bool success = true);
81 
83  static DtSimComponent* creator(const DtString & name, DtLocalObject* owner,
84  DtSimulationServices * simManager, DtComponentDescriptor* desc,
85  DtReaderWriterRegistry * parentRegistry);
86 
90  virtual DtMunitionResource* lookupExpendableResource(const DtString & resourceName);
91 
97  virtual bool launchExpendableResources(int numberToFire);
98 
101  virtual void clearTask();
102 
103 protected:
104  virtual void processLaunch(const DtTaskMessage& msg, DtSimTaskStatePtr taskStatePtr);
105 
107  virtual bool createPSR();
108 
113  virtual bool autoLaunchTriggered();
114 
115  virtual DtString selectResourceForAutoLaunch(const DtObjectType & missileType);
116 
117  virtual void setupAutoLaunchTriggerList();
118  virtual void setUpAutoLaunchTaskFromDescriptor();
119 
121  virtual DtCreateObjectHandle createResourceObject(const DtObjectType & objType);
122 
123 protected:
125 
129 
132 
137  typedef std::list<DtLaunchExpendableResourcePSR*> DtExpendablesPsrList;
139 
143 
146 };
147 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
int myNumberPerInterval
Definition: launchExpendableResourceController.h:130
Handle returned from Create Object Service calls.
Definition: createObjectHandle.h:12
virtual void registerTaskMsgCallbacks()
DtLaunchExpendableResourceTask represents a launching task where by the entity will launch the specif...
Definition: launchExpendableResourceTask.h:30
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
DtLaunchExpendableResourceControllerDescriptor; descriptor for the DtLaunchExpendableResourceControll...
Definition: launchExpendableResourceControllerDescriptor.h:41
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...
DtExpendablesPsrList myExpendablesPsrs
Definition: launchExpendableResourceController.h:138
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...
virtual void clearTask()
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
DtLaunchExpendableResourcePSR * myProcessState
Saved out in the Order of Battle file(.oob).This will save out how many resources we have left to fir...
Definition: launchExpendableResourceController.h:128
DtBoost::shared_ptr< DtSimTaskState > DtSimTaskStatePtr
Definition: taskAndTaskStateDefines.h:18
Definition: objectType.h:27
DtManagedObjectListConstPtr myAutoDetectObjectsList
Definition: launchExpendableResourceController.h:144
DtLaunchExpendableResourceTask * myAutoLaunchTask
Definition: launchExpendableResourceController.h:131
const DtLaunchExpendableResourceControllerDescriptor * myDesc
Definition: launchExpendableResourceController.h:124
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 ...
virtual DtSimTaskStatePtr currentTaskState() const
End User Description: This controller handles DtLaunchExpendableResourceTask tasks. When it receives this task, the entity will check if the resource is available and if so will launch it with desired intial velocity specified in the descriptor. Uses Descriptor Type: DtLaunchExpendableResourceControllerDescriptor.
Definition: launchExpendableResourceController.h:28
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
DtBoost::shared_ptr< const DtManagedObjectList > DtManagedObjectListConstPtr
Typedef for a shared pointer to a const DtOrgViewManagedObjectList. These lists are used within VR-Fo...
Definition: managedObjectList.h:35
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Definition: launchExpendableResourceController.h:145
std::list< DtLaunchExpendableResourcePSR * > DtExpendablesPsrList
When there are multiple DtLaunchExpendableResourceControllers installed on a single entity...
Definition: launchExpendableResourceController.h:137
virtual bool postAddComponentsInit()
Calls enableTaskTypes()
class DtLaunchExpendableResourcePSR:
Definition: launchExpendableResourcePSR.h:27
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
DtLaunchExpendableResourcePSR * myCurrentlyTaskedPsr
If this is the coordinating controller it keeps a pointer to the currently tasked PSR from myExpendab...
Definition: launchExpendableResourceController.h:142
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
Contains the DtMunitionResource class declaration.
Definition: munitionResource.h:24

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)