19 #include <vlpi/disEnums.h>
51 virtual bool init()
override;
59 virtual bool createMountingController();
63 virtual const char*
type()
const override;
70 virtual bool waitingForFire();
73 virtual void setWaitingForFire(
bool waiting);
76 virtual bool createWeaponOutputPortGroup();
82 virtual bool createWeaponInputPortGroup();
89 virtual bool createTriggerPort();
92 virtual bool createLoadAmmunitionPort();
95 virtual bool createLoadedPort();
98 virtual bool createArtPartTypePort();
108 virtual void setPreloadWeapon(
bool doPreload);
109 virtual bool preloadWeapon()
const;
111 virtual void setLoadAmmoTime(
DtTime loadAmmoTime);
112 virtual DtTime loadAmmoTime()
const;
114 virtual void setUnloadAmmoTime(
DtTime unloadAmmoTime);
115 virtual DtTime unloadAmmoTime()
const;
120 virtual void setMaxVehicleSpeedToFire(DtReal maxVehicleSpeedToFire);
121 virtual DtReal maxVehicleSpeedToFire()
const;
123 virtual bool weaponCorrectlyOriented()
const;
131 virtual void setMaxAzimuthAngleOffBoresight(DtReal maxAngle);
132 virtual DtReal maxAzimuthAngleOffBoresight()
const;
133 virtual void setMaxElevationAngleOffBoresight(DtReal maxAngle);
134 virtual DtReal maxElevationAngleOffBoresight()
const;
139 virtual void initProcessSR();
145 virtual void setCurrentMunitionName(
const DtString & currentMunitionName);
147 virtual const DtString & currentMunitionName()
const;
155 virtual void tick()
override;
182 virtual void lookupAndCacheProcessSR();
190 virtual bool weaponStowable();
193 virtual bool weaponStowed();
197 virtual void setWeaponStowed(
bool v);
199 static void setStowWeaponCallback(
DtSimMessage* msg,
void* usrData);
const DtBaseWeaponControllerDescriptor * myBaseWeaponCtlrDesc
Get ammo select tables from here.
Definition: baseWeaponController.h:291
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtIntegerInputPort * myArtPartTypePort
Input Port Name: art-part-type Input Port Description: Type of articulated part. Input Port Range: I...
Definition: baseWeaponController.h:254
DtBooleanOutputPort * myStowCommandOutputPort
Output Port Name: stow-command Output Port Description: Indicates if the controller wants to stow the...
Definition: baseWeaponController.h:267
DtBaseWeaponController is a controller that creates the ports needed to choose ammo for...
Definition: baseWeaponController.h:34
virtual bool postAddComponentsInit() override
Calls enableTaskTypes()
DtIntegerInputPort * myStowedStateInputPort
Input Port Name: stowed-state Input Port Description: Receives the current stowed/deployed state of t...
Definition: baseWeaponController.h:261
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
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...
DtVrfWeaponPSR * myWeaponProcessState
Pointer to a process state repository used to store state data associated with this component...
Definition: baseWeaponController.h:299
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
DtBooleanOutputPort * myLoadedPort
Output Port Name: loaded Output Port Description: True if loaded. Output Port Range: Output Port Def...
Definition: baseWeaponController.h:243
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
Instances of DtAmmunitionOutputPort are output ports through which data producers can send informatio...
Definition: ammunitionIOPort.h:48
File: weaponPSR.h.
Definition: vrfWeaponPSR.h:31
This file contains the class declaration for the.
virtual bool init() override
Calls setRadio()
DtReal myFireMaxVehicleSpeed
Some vehicles must stop to shoot, others have a maximum speed to launch a munition.
Definition: baseWeaponController.h:285
bool myWaitingForFire
This flag is set to true when the controller pulls the trigger, and set back to false when the contro...
Definition: baseWeaponController.h:281
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 ...
DtAmmunitionOutputPort * myLoadAmmunitionPort
Output Port Name: ammunition Output Port Description: Type of ammunition to use Output Port Range: O...
Definition: baseWeaponController.h:229
DtOutputPortGroup * myWeaponOutputPortGroup
Output Port Group Name: weapon-control Output Port Group Description:
Definition: baseWeaponController.h:222
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
DtBaseWeaponControllerDescriptor; descriptor for the DtBaseWeaponController component.
Definition: baseWeaponControllerDescriptor.h:30
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:95
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
DtInputPortGroup * myWeaponInputPortGroup
Input Port Group Name: weapon-info Input Port Group Description:
Definition: baseWeaponController.h:247
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtReal myMaxAzimuthAngleOffBoresight
Definition: baseWeaponController.h:287
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Member to allow for access to platform specific data.
Definition: baseWeaponController.h:302
DtReal myMaxElevationAngleOffBoresight
Definition: baseWeaponController.h:288
DtBaseMountingController is a controller that generates the azimuth and elevation controls needed to ...
Definition: baseMountingController.h:36
bool myDoWeaponPreload
If myDoWeaponPreload is true, the loader will load the first munition from the ammoselect table if th...
Definition: baseWeaponController.h:276
DtBooleanOutputPort * myTriggerPort
Output Port Name: trigger Output Port Description: True to fire. Output Port Range: Output Port Defa...
Definition: baseWeaponController.h:236
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
DtBaseMountingController * myBaseMountingController
Definition: baseWeaponController.h:292