VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
turretAcquireController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
17 
19 
20 class DtString;
22 class DtSimMessage;
23 class DtEntityListPort;
24 class DtSimIndividualLocalEntity;
25 
27 class DtVectorOutputPort;
32 
59 {
60 
61 public:
62 
66  DtLocalObject* owner,
67  DtSimulationServices* simManager,
68  DtComponentDescriptor* desc = 0,
69  DtReaderWriterRegistry* parentRegistry = 0);
70 
72  virtual ~DtTurretAcquireController();
73 
76  virtual const char* type() const;
77 
79  virtual bool postAddComponentsInit();
80 
82  virtual void preFirstTickInit();
83 
85  virtual void tick();
86 
88  virtual bool inSector(const DtSimObject* entity) const;
89 
91  virtual DtSimObjectReference chooseTarget(const DtEntityTargetList& targetList,
92  DtTime currentTime) ;
93 
95  virtual DtSimObjectReference easier(DtSimObjectReference entity1, DtSimObjectReference entity2)
96  const;
97 
102  virtual DtIntegerOutputPort * losPort();
103 
107  static DtSimComponent * creator(const DtString& name,
108  DtLocalObject* owner,
109  DtSimulationServices* simManager,
110  DtComponentDescriptor* desc = 0,
111  DtReaderWriterRegistry* parentRegistry = 0);
112 
113 protected:
114 
115  virtual void lookupAndCacheProcessSR();
116 
118  virtual bool createPorts();
119 
121  virtual bool createPortGroups();
122 
135  virtual bool canTrackTarget(const DtVector& localEyepoint, DtSimObjectReference targetObject,
136  bool *dataAvailable = 0) ;
137 
138 
139 private:
140 
143 
146  orig);
147 
149  const DtTurretAcquireController & operator=(const
151 
152 protected:
153 
160 
163 
170 
178 
182 
190 
198 
206 
214 
216 
218 
221 
224 };
225 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
The DtTurretAcquireController attempts to slew the turret to track targets.
Definition: turretAcquireController.h:58
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
virtual bool postAddComponentsInit() override
Calls enableTaskTypes()
DtEntityListInputPort * myTargetListPort
Input Port Name: target-list Input Port Description: List of detected hostile targets. Input Port Range: Input Port Default Value: Input Group Parent:
Definition: turretAcquireController.h:169
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
virtual const char * type() const =0
This returns a string from compTypes.h, and identifies the type of component.
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
DtOutputPortGroup is a data port group of a data provider. It may contain any number of DtOutputPorts...
Definition: outputPortGroup.h:34
File: turBalGunPSR.h.
Definition: vrfTurretedBalGunPSR.h:26
const DtTurretAcquireControllerDescriptor * myTurretAcquireControllerDescriptor
Definition: turretAcquireController.h:217
DtIntegerOutputPort * myLosPort
Output Port Name: line-of-sight Output Port Description: Indicates if a LOS calculation was performed...
Definition: turretAcquireController.h:177
Instances of DtVectorOutputPort are output ports through which data producers can send a DtVector...
Definition: vectorIOPort.h:52
Contains class declarations for DtEntityListInputPort, DtEntityListOutputPort, and DtEntityListPortDa...
Definition: entListIOPort.h:29
DtBooleanOutputPort * myForbidTurnPort
Output Port Name: forbid-turn Output Port Description: Indicates whether the entity can be turned to ...
Definition: turretAcquireController.h:197
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 ...
DtVrfTurretedBalGunPSR * myProcessState
Pointer to a process state repository used to store state data associated with this component...
Definition: turretAcquireController.h:159
DtVectorOutputPort * myAimPointPort
Output Port Name: aim-point Output Port Description: Only active when acquiring a target...
Definition: turretAcquireController.h:189
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
End User Description: DtControllerComponent is the base class for all controllers components...
Definition: controllerComponent.h:31
DtBooleanOutputPort * myAllowAzimuthAimingPort
Output Port Name: allow-azimuth-aiming Output Port Description: Indicates whether the aim-controller ...
Definition: turretAcquireController.h:213
virtual bool createPortGroups()
Called by init. Derived classes should override this method to create all their input/output port gro...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
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:88
A DtComponentDescriptor that has a flag to indicate whether or not line of sight should be checked...
Definition: turretAcquireControllerDescriptor.h:40
Instances of DtIntegerOutputPort are output ports through which data producers can send integer value...
Definition: integerIOPort.h:45
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Member to allow for access to platform specific data.
Definition: turretAcquireController.h:223
DtOutputPortGroup * myAimWeaponControlPortGroup
Output Port Group Name: aim-weapon-control Output Port Group Description: .
Definition: turretAcquireController.h:181
bool myNoLosWarningWasGiven
Remember if this debug message has already been printed.
Definition: turretAcquireController.h:220
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
DtBooleanOutputPort * myAimAtAnglePort
Output Port Name: aim-at-angle Output Port Description: Indicates whether the aim controller should a...
Definition: turretAcquireController.h:205

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)