17 #include <vlpi/disEnums.h>
67 virtual const char*
type()
const;
82 virtual bool createTriggerPort();
85 virtual bool createQuantityOutputPort();
88 virtual bool createLoadedPort();
91 virtual bool createLosOutputPort();
94 virtual bool createLosInputPort();
97 virtual bool createWeaponsHoldInputPort();
99 virtual bool createTargetToAcquireOutputPort();
101 virtual void setLoadAmmoTime(
DtTime loadAmmoTime);
102 virtual DtTime loadAmmoTime()
const;
104 virtual void setUnloadAmmoTime(
DtTime unloadAmmoTime);
105 virtual DtTime unloadAmmoTime()
const;
121 virtual bool chooseAmmo(
const DtEntityType& targetType,
123 munition, DtDetonatorFuze& fuze,
int& ammoAvailable);
126 virtual bool checkCurrentAmmo(
int& ammoAvailable);
130 virtual bool ammoOKToUse(
const DtEntityType& targetType);
133 virtual void initProcessSR();
165 virtual void lookupAndCacheProcessSR();
180 void getMunitionResources(std::list<DtString>& resourceList);
183 virtual void updateResourceList();
187 virtual bool weaponsHoldState();
192 static void setResourceCallback(
DtSimMessage * msg,
void * usrData);
199 static void setRestoreCallback(
DtSimMessage * msg,
void * usrData);
204 bool outOfAmmo()
const;
DtWeaponComponentInterface * myWeaponComponentInterface
Interface between this weapon controller and the entity's DtTargetSelectionController.
Definition: ballisticGunController.h:312
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtBooleanOutputPort * myTriggerPort
Output Port Name: trigger Output Port Description: Sends a new True value when trigger is pulled...
Definition: ballisticGunController.h:235
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
DtOutputPortGroup * myGunControlPortGroup
Output Port Group Name: gun-control Output Port Group Description:
Definition: ballisticGunController.h:262
DtEntityListOutputPort * myTargetToAcquireOutputPort
Output Port Name: target-to-acquire Output Port Description: When there is a target in the weapon int...
Definition: ballisticGunController.h:276
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
DtIntegerOutputPort * myLosOutputPort
Output Port Name: line-of-sight Output Port Description: Indicates the result of a line of sight calc...
Definition: ballisticGunController.h:258
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.
bool myWaitingForFire
This flag is set to true when the controller pulls the trigger; it won't do anything in the tick func...
Definition: ballisticGunController.h:305
bool myOutOfAmmoWarn
Flag so an out-of-ammo warning is only sent once per target.
Definition: ballisticGunController.h:308
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
DtOutputPortGroup is a data port group of a data provider. It may contain any number of DtOutputPorts...
Definition: outputPortGroup.h:34
DtBooleanInputPort * myWeaponsHoldInputPort
Input Port Name: weapons-hold Input Port Description: When true, all firing is disabled. Connecting to this port is optional. If no connection is made, it will default to false. Input Port Range: True/False Input Port Default Value: False .
Definition: ballisticGunController.h:270
virtual bool init()
Calls setRadio()
This file contains the class declaration for the.
virtual void disable()
Is this component enabled or not. If enabled, component's tick function will be called, otherwise it will not. Default is true (enabled).
int myRoundsAvailable
The quantity of the current munition in the resources store.
Definition: ballisticGunController.h:288
virtual void enable()
Is this component enabled or not. If enabled, component's tick function will be called, otherwise it will not. Default is true (enabled).
Instances of DtEntityListOutputPort are output ports through which data producers can send a list of ...
Definition: entListIOPort.h:45
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 ...
DtBallisticGunController provides ammunition loading, unloading, and trigger inputs for use by a ball...
Definition: ballisticGunController.h:44
DtIntegerResource implements the required functions for a resource that can be measured by an integer...
Definition: integerResource.h:17
DtVrfBalGunPSR * myProcessState
Pointer to a process state repository used to store state data associated with this component...
Definition: ballisticGunController.h:295
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
virtual bool createPortGroups()
Called by init. Derived classes should override this method to create all their input/output port gro...
DtSimMunition myCurrentMunition
The correct munition and fuze for our current target.
Definition: ballisticGunController.h:284
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
DtIntegerOutputPort * myQuantityOutputPort
Output Port Name: quantity Output Port Description: Sends the number of rounds to be fired with a sin...
Definition: ballisticGunController.h:243
DtDetonatorFuze myCurrentFuze
Definition: ballisticGunController.h:285
DtIntegerInputPort * myLosInputPort
Input Port Name: line-of-sight Input Port Description: Indicates the result of a line of sight calcul...
Definition: ballisticGunController.h:228
Instances of DtIntegerOutputPort are output ports through which data producers can send integer value...
Definition: integerIOPort.h:45
const DtBallisticGunControllerDescriptor * myGunDescriptor
Get ammo select tables from here.
Definition: ballisticGunController.h:298
DtSimMunition class.
Definition: simMunition.h:31
DtUUID myPreviousTarget
Maintain the target we had last tick (if any) to detect changes in target (which will kick off possib...
Definition: ballisticGunController.h:281
DtBallisticGunControllerDescriptor, descriptor for the DtBallisticGunController component.
Definition: ballisticGunControllerDescriptor.h:26
virtual bool postAddComponentsInit()
Calls enableTaskTypes()
DtBooleanOutputPort * myLoadedPort
Output Port Name: loaded Output Port Description: True when the gun is loaded. Output Port Range: Ou...
Definition: ballisticGunController.h:250
Class DtVrfBalGunPSR: Used to hold checkpointable state for the processes associated with ballistic g...
Definition: vrfBalGunPSR.h:38
Represents the interface between the DtTargetSelectionController and a weapon system.
Definition: weaponComponentInterface.h:20
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