VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
weaponManagementController.h
Go to the documentation of this file.
1 #pragma once
4 
5 class DtString;
7 class DtTaskMessage;
8 class DtSimMessage;
10 
18 {
19 public:
20 
24  DtLocalObject* owner,
25  DtSimulationServices* simManager,
26  DtComponentDescriptor* desc = nullptr,
27  DtReaderWriterRegistry* parentRegistry = nullptr);
28 
31 
34  virtual const char* type() const override;
35 
37  virtual bool init() override;
38 
39  virtual bool postAddComponentsInit() override;
40 
41  virtual void preFirstTickInit() override;
42 
43  virtual void tick() override;
44 
45  virtual void registerTaskMsgCallbacks() override;
46 
48  virtual void disable() override;
49 
51  virtual void enableTaskTypes() override;
52 
56  static DtSimComponent * creator(const DtString& name,
57  DtLocalObject* owner,
58  DtSimulationServices* simManager,
59  DtComponentDescriptor* desc = nullptr,
60  DtReaderWriterRegistry* parentRegistry = nullptr);
61 
62 protected:
63  static void fireAtTargetTaskCallback(DtSimMessage* msg, void* usr);
64  virtual void processFireAtTargetTask(DtSimMessage* msg);
65 
68 
69  static void hostilitiesChangedCallback(DtU8 force, void* usr);
70  virtual void processHostilitiesChanged(DtU8 force);
72 
74  virtual bool createPorts() override;
75 
78  virtual void setupDetectableForces(DtForceType);
79 
81 
82  static void setTargetCallback(DtSimMessage* msg, void* usr);
83  virtual void processSetTarget(DtSimMessage* msg);
85 
86 protected:
94 
96  DtForceType myForce;
97 
102 
103 
104 protected:
105  DtWeaponManagementController() = delete;
108 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual void disable() override
Overridden to allow tasks controllers that can be disabled to call task complete. ...
virtual bool postAddComponentsInit() override
Calls enableTaskTypes()
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
virtual void registerTaskMsgCallbacks()
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:22
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
This controller read info from the weaponInfo state of an entity and manages some of the duties relat...
Definition: weaponManagementController.h:17
virtual bool init() override
Calls setRadio()
virtual void enableTaskTypes()
Finds the script controller, and enables the new task types on that controller. Calls enableScriptedT...
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 ...
Instances of DtObjectTypesListOutputPort are output ports through which data producers can send a lis...
Definition: objectTypesListIOPort.h:46
DtObjectTypesListOutputPort * myTypesToDetectOutputPort
Output Port Name: target-types-to-detect Output Port Description: List of types of object the target ...
Definition: weaponManagementController.h:93
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:95
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtForceType myForce
Force used to put information onto port for hostility matrix.
Definition: weaponManagementController.h:96
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
bool mySetupDetectableForcesRequired
Flag set to true if a re-run of the setupDetectableForces() is required on the next tick...
Definition: weaponManagementController.h:101
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 Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)