VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
DtLauncherController Class Reference

DtLauncherController is a controller that accepts input from a target sensor, and provides ammunition type, load status, and trigger inputs to a missile launcher actuator.

End User Description: It also provides azimuth and elevation inputs to corresponding azimuth and elevation mount actuators (moveable components upon which the launcher may be mounted). The launcher controller designates its target as the first target that appears in the entity's sector of responsibility. Based on the target type, it loads the appropriate munition type. If a change in target occurs, requiring a change in munition type, or fuse type, or both (that is, the new target detected is of a different type than the original target), the weapon unloads the old munition, and then loads the new type of munition. If no target is available, and the preload-weapon parameter is set, then the first munition type specified in the munition table is loaded.

When a guided missile is fired, reloading is suspended while the missile is active. Once the missile detonates or passes the target, reloading may resume.

The target is acquired when the azimuth and elevation of the weapon align with the azimuth and elevation to the target, within the ranges specified by the munition-maneuver-margin parameter. The controller reorients the weapon in azimuth and elevation as needed.

Once a target has been acquired, the weapon is loaded, and the entity has permission to fire (given by the entity's rules of engagement, for example, "fire-at-will"), the weapon controller fires. It creates a new missile entity, sets the ID of the missile entity in the missile ID port, sets the trigger port to true, and depletes the resource associated with the missile type.

Uses Descriptor Type: DtWeaponControllerDescriptor

Inheritance diagram for DtLauncherController:
Inheritance graph
[legend]

Classes

struct  MissileInfo
 

Public Member Functions

 DtLauncherController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtLauncherController () override
 
virtual bool init () override
 
virtual void registerTaskMsgCallbacks () override
 
virtual AcceptLevel acceptTask (const DtTaskMessage &task) override
 
virtual const char * type () const override
 
virtual void tick () override
 
virtual bool createMissileIdPort ()
 
virtual bool createTargetPointPort ()
 
virtual bool createTargetEntityIdPort ()
 
virtual void fire () override
 
virtual void missileDetonated (const makVrfEvents::DtDetonationEvent *detInter)
 
virtual void detonationCallback (const makVrfEvents::DtEvent &e)
 
virtual void disconnectMissileFromLauncher (const DtUUID &missId)
 
virtual DtSimObjectReference mostRecentMissileFired ()
 
virtual bool missilePassedTarget (const DtMissileSimObjectFacade &lastMissile, double &distSquaredToTargetOut)
 
virtual double abandonPassedMissileDistance ()
 
virtual void setAbandonPassedMissileDistance (const double &distance)
 
- Public Member Functions inherited from DtWeaponController
 DtWeaponController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtWeaponController () override
 
virtual bool createMountingController () override
 
virtual const DtSimObject * chooseTarget ()
 
virtual DtSimObjectReference chooseTarget (const DtEntityTargetList &targetList) const
 
virtual const DtVector chooseLocationTarget ()
 
virtual const DtSimObject * chooseTargetWithOffset (DtVector &offset)
 
virtual void tickMunitionLoader (const DtSimObject *target)
 
virtual bool acquireTarget (const DtSimObject *target)
 
virtual bool acquireLocationTarget (const DtVector locTarget)
 
virtual bool acquireTargetWithOffset (const DtSimObject *target, const DtVector &offset)
 
virtual void maneuverRequiredToAcquireTarget (DtReal requiredHeading, DtReal requiredPitch, DtReal requiredMaxSpeed)
 
bool outOfAmmo () const
 
virtual bool loadedAmmoValidForTarget (const DtSimObject *target) const
 
virtual bool chooseAmmo (const DtEntityType &entityType, DtSimMunition &munitionOut, DtDetonatorFuze &fuzeOut, bool setCurrentMunition=true)
 
virtual bool acceptSensorTargettingInput ()
 
virtual bool inSector (const DtSimObject *entity) const
 
virtual void findBodyHeadingElevationToTarget (const DtSimObject *entity, DtReal &bodyHeadingOut, DtReal &bodyElevationOut) const
 
virtual DtSimObjectReference easier (DtSimObjectReference entity1, DtSimObjectReference entity2) const
 
virtual void enable () override
 
virtual void disable () override
 
- Public Member Functions inherited from DtBaseWeaponController
 DtBaseWeaponController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtBaseWeaponController () override
 
virtual bool postAddComponentsInit () override
 
virtual bool waitingForFire ()
 
virtual void setWaitingForFire (bool waiting)
 
virtual bool createWeaponOutputPortGroup ()
 
virtual DtOutputPortGroup * weaponOutputPortGroup ()
 
virtual bool createWeaponInputPortGroup ()
 
virtual DtInputPortGroup * weaponInputPortGroup ()
 
virtual bool createTriggerPort ()
 
virtual DtBooleanOutputPort * triggerPort () const
 
virtual bool createLoadAmmunitionPort ()
 
virtual DtAmmunitionOutputPort * loadAmmunitionPort () const
 
virtual bool createLoadedPort ()
 
virtual DtBooleanOutputPort * loadedPort () const
 
virtual bool createArtPartTypePort ()
 
virtual DtIntegerInputPort * artPartTypePort () const
 
virtual void setPreloadWeapon (bool doPreload)
 
virtual bool preloadWeapon () const
 
virtual void setLoadAmmoTime (DtTime loadAmmoTime)
 
virtual DtTime loadAmmoTime () const
 
virtual void setUnloadAmmoTime (DtTime unloadAmmoTime)
 
virtual DtTime unloadAmmoTime () const
 
virtual void setMaxVehicleSpeedToFire (DtReal maxVehicleSpeedToFire)
 
virtual DtReal maxVehicleSpeedToFire () const
 
virtual bool weaponCorrectlyOriented () const
 
virtual void initProcessSR ()
 
virtual DtBaseMountingController * mountingController ()
 
virtual void setCurrentMunitionType (const DtEntityType &currentMunitionName)
 
virtual const DtEntityType & currentMunitionType () const
 
virtual DtVrfWeaponPSR * weaponProcessState ()
 
virtual const DtVrfWeaponPSR * weaponProcessState () const
 
virtual void setMaxAzimuthAngleOffBoresight (DtReal maxAngle)
 
virtual DtReal maxAzimuthAngleOffBoresight () const
 
virtual void setMaxElevationAngleOffBoresight (DtReal maxAngle)
 
virtual DtReal maxElevationAngleOffBoresight () const
 
- Public Member Functions inherited from DtSingleTaskControllerComponent
 DtSingleTaskControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *compDesc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtSingleTaskControllerComponent () override
 
virtual void postTick () override
 
virtual bool beginProcessingTask (const DtTaskMessage &task, DtSimTaskStatePtr taskState) override
 
virtual void taskNotify (const DtSimTask &task) override
 
virtual void taskComplete (bool success=true)
 
virtual void clearTask () override
 
virtual void suspendTask ()
 
virtual int sendSubtask (DtSimTask &task)
 
virtual void clearSubtask (int subtaskId)
 
virtual void addPendingSubtaskId (int subtaskId)
 
virtual bool findPendingSubtaskId (int subtaskId)
 
virtual bool isSubtasked () const
 
virtual void removePendingSubtaskId (int subtaskId)
 
virtual void removeAllPendingSubtaskIds ()
 
virtual std::vector< int > currentPendingSubstaskIds () const
 
virtual DtSubtaskStatusEntry * subtaskStatus (int subtaskId)
 
virtual void clearCurrentTaskMessage ()
 
virtual DtTaskMessage * currentTaskMessage () const
 
virtual DtSimTaskStatePtr currentTaskState () const
 
virtual bool decideToGiveUpTask () const
 
virtual void giveUpTask ()
 
virtual bool taskActive (int taskId) const override
 
virtual bool clearTopLevelTasks () override
 
virtual void clearConflictingTopLevelTasks (const DtSimTaskMessageType &conflictType) override
 
virtual void clearTasksByType (const DtSimTaskMessageType &taskType) override
 
virtual void clearTaskById (int taskId) override
 
virtual DtSuspendedTaskInfo * suspendTaskById (int taskId) override
 
virtual DtSuspendedTaskInfo * suspendSubtaskById (int taskId, int subtaskId) override
 
virtual std::list
< DtTaskMessage * > 
currentTaskMessages () const override
 
virtual DtTaskWithTaskStateListPtr topLevelTasks () const override
 
virtual void updateImgui () override
 
virtual void initializeTaskInformationStateProperty (const DtSimTaskMessageType &taskType)
 
virtual void updateCurrentTaskInformationStatusProperty (const DtString &status)
 
virtual DtString taskInformationStatusPropertyValue (const DtSimTaskMessageType &taskType) const
 
virtual DtString currentTaskInformationStatusPropertyValue () const
 
virtual DtRwPropertiesStructure * taskInformationProperty (const DtSimTaskMessageType &taskType)
 
virtual DtRwPropertiesStructure * currentTaskInformationProperty ()
 
- Public Member Functions inherited from DtTaskControllerComponent
 DtTaskControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *compDesc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtTaskControllerComponent () override
 
virtual bool showCurrentTaskInGui () const
 
virtual void setRadio (DtSimRadio *radio) override
 
virtual void addTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtTaskMessageCallbackFcn fcn, void *usr, bool hidden=false)
 
virtual void addTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtMessageCallbackFcn fcn, void *usr, bool hidden=false)
 
virtual void removeTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtMessageCallbackFcn fcn, void *usr)
 
virtual void removeTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtTaskMessageCallbackFcn fcn, void *usr)
 
virtual void sendTaskCanceled (DtTaskMessage *taskMsg)
 
virtual bool taskVisualizationsActive () const override
 
virtual void setTasked (bool tasked)
 
virtual bool tasked () const
 
- Public Member Functions inherited from DtControllerComponent
 DtControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtControllerComponent () override
 
virtual DtSimRadio * radio ()
 
virtual void enableTaskTypes ()
 
virtual void enableScriptedTask (const DtString &scriptId)
 
virtual void disableTaskTypes ()
 
- Public Member Functions inherited from DtSimComponent
 DtSimComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtSimComponent () override
 
virtual void setParentSystem (DtComponentSystem *system)
 
DtComponentSystem * parentSystem () const
 
virtual void timedTick ()
 
virtual void setMinTickPeriod (double minTickPeriod, double minTickPeriodVariance)
 
virtual void setupFirstTickTime ()
 
virtual void setEntity (DtLocalObject *entity)
 
virtual DtSimComponent * nextComponent ()
 
virtual DtSimComponent * prevComponent ()
 
virtual void setListItem (DtListItem *item)
 
virtual DtListItem * listItem ()
 
virtual void putData (std::string &fp, int indentLevel=0) override
 
virtual DtlObjPtr getData (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) override
 
virtual void addInputPort (DtInputPort *port)
 
virtual void removeInputPort (DtInputPort *port)
 
virtual DtInputPort * lookupInputPort (const DtString &portName)
 
virtual DtList inputPortList () const
 
virtual void addOutputPort (DtOutputPort *port)
 
virtual void removeOutputPort (DtOutputPort *port)
 
virtual DtOutputPort * lookupOutputPort (const DtString &portName)
 
virtual DtList outputPortList () const
 
virtual void addInputPortGroup (DtInputPortGroup *group)
 
virtual void removeInputPortGroup (DtInputPortGroup *group)
 
virtual DtInputPortGroup * lookupInputPortGroup (const DtString &groupName)
 
virtual DtList inputPortGroupList () const
 
virtual void addOutputPortGroup (DtOutputPortGroup *group)
 
virtual void removeOutputPortGroup (DtOutputPortGroup *group)
 
virtual DtOutputPortGroup * lookupOutputPortGroup (const DtString &groupName)
 
virtual DtList outputPortGroupList () const
 
virtual int priority () const
 
virtual void setPriority (int priority)
 
double dT () const
 
virtual void setDT (double deltaT)
 
virtual void setComponentDescriptor (DtComponentDescriptor *componentDescriptor)
 
virtual const
DtComponentDescriptor * 
componentDescriptor () const
 
virtual bool tickWhileDestroyed () const
 
DtString toString (const DtEntityType &entityType) const
 
DtVrfProcessStateRepositoryManager * psrManager ()
 
virtual const DtSymbolString & componentFullName () const
 
DtPhysicalWorld * physicalWorld ()
 
const DtPhysicalWorld * physicalWorld () const
 
const DtAttachedTerrain * terrainAttachedTo () const
 
DtLocalObject * entity ()
 
const DtLocalObject * entity () const
 
DtSimulationServices * simulationServices ()
 
const DtSimulationServices * simulationServices () const
 
const Coordinate_System * coordinateSystem () const
 
virtual void isClutterChanged ()
 
virtual bool taskVisualizationsEnabled () const
 
makVrf::DtTaskVisualizationMap & taskVisualizations ()
 
virtual bool debugActive () const
 
virtual bool isEnabled ()
 
virtual void setIsEnabled (bool yesNo)
 
virtual DtOutputStream & objectConsoleDebug (const DtString &channel="") const
 
virtual DtOutputStream & objectConsoleVerbose (const DtString &channel="") const
 
virtual DtOutputStream & objectConsoleInfo (const DtString &channel="") const
 
virtual DtOutputStream & objectConsoleWarn (const DtString &channel="") const
 
virtual DtOutputStream & objectConsoleError (const DtString &channel="") const
 
virtual int notifyLevel () const
 
virtual DtSimResourceManager & resourceManager ()
 
virtual const
DtSimResourceManager & 
resourceManager () const
 
VRF4API_METHOD const
DtSimulationServices * 
simManager () const
 
- Public Member Functions inherited from DtReaderWriter
 DtReaderWriter ()
 
 DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtReaderWriter (const DtReaderWriter &, DtReaderWriterRegistry *parentRegistry=NULL)
 
const DtReaderWriter & operator= (const DtReaderWriter &orig)
 
bool operator== (const DtReaderWriter &) const
 
bool operator!= (const DtReaderWriter &rhs) const
 
virtual ~DtReaderWriter ()
 
virtual void putSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 
virtual void postPutSelf ()
 
virtual void prePutSelf ()
 
virtual void getSelf (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
virtual void postGetSelf ()
 
virtual void preGetSelf ()
 
virtual void writeSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 
virtual DtSymbolString name () const
 
virtual void addAlias (const DtSymbolString &alias)
 
virtual void addAlias (const DtString &alias)
 
virtual bool hasAlias (const DtSymbolString &alias)
 
virtual const aliasContainer & aliases () const
 
virtual void setReadonly (bool flag)
 
bool isReadonly () const
 
virtual void reset ()
 
virtual int alignment () const
 
virtual bool variableIsBound () const
 
virtual void unbindVariable ()
 
virtual void setName (const DtString &)
 
virtual const char * readerWriterType () const
 
virtual const char * xmlType () const
 
virtual DtString prettyPrint () const
 
std::string debugText () const
 
virtual void bindVariables (DtVariableBindingsList variableBindings)
 
virtual std::list
< DtVariableNameType > 
unboundVariables () const
 
bool invalid () const
 
virtual bool hasChild (const DtReaderWriter *p) const
 
virtual bool hasVariableReference () const
 
virtual void bindLocalVariables (const DtVariableBindingsList &variableBindings)
 
virtual void recordUpdateTime () const
 
virtual bool changedSinceLastChecked ()
 
virtual bool peekChangedSinceLastChecked () const
 
virtual void setValueSpecified (bool specified, bool recurse=false)
 
virtual bool valueSpecified () const
 
virtual bool isVariableReference () const
 
virtual void setIsVariableReference (bool value)
 
virtual void clearAllVariableReferenceFlags ()
 
virtual DtSymbolString variableName () const
 
virtual void setVariableName (const DtSymbolString variableName)
 
virtual const DtReaderWriter * defaultRWValue () const
 
virtual DtReaderWriter * defaultRWValue ()
 
virtual void setDefaultRWValue (DtReaderWriter *)
 
virtual bool checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
const DtReaderWriterRegistry & registry () const
 
DtReaderWriterRegistry & registry ()
 
virtual DtPropertyInterface * property ()
 
virtual const DtPropertyInterface * property () const
 
virtual DtString toXml () const
 
virtual DtRwVariableBindings * generateVariableBindings () const
 
virtual bool toXml (const DtFilename &) const
 
virtual bool fromXml (const DtString &)
 
virtual bool fromXmlFile (const DtFilename &)
 
virtual void putSelf (DtEnvironmentSP, DtEnvValueSP parent) const
 
virtual void putData (DtEnvironmentSP, DtEnvValueSP value) const
 
virtual void putVariableReference (DtEnvironmentSP, DtEnvValueSP value) const
 
virtual void getSelf (const DtEnvironmentSP, const DtEnvValueSP root, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual void getData (const DtEnvironmentSP, const DtEnvValueSP, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual void unrecognizedItem (const DtEnvironmentSP env, const DtEnvValueSP root, const SearchPaths &searchPaths, const DtVariableBindingsList &varBindings)
 
virtual void getVariableReference (DtEnvironmentSP, DtEnvValueSP value)
 

Protected Types

typedef std::map< DtUUID,
DtMissileSimObjectFacade * > 
MissileSimObjectFacadeMap
 
- Protected Types inherited from DtTaskControllerComponent
typedef std::pair
< DtTaskMessageCallbackFcn,
void * > 
DtTaskCallbackMapPair
 
typedef std::map
< DtSimTaskMessageType,
DtTaskCallbackMapPair > 
DtTaskCallbackMap
 
- Protected Types inherited from DtSimComponent
typedef std::map< DtString,
DtInputPort * > 
DtInputPortMap
 
typedef std::map< DtString,
DtOutputPort * > 
DtOutputPortMap
 
typedef std::map< DtString,
DtInputPortGroup * > 
DtInputPortGroupMap
 
typedef std::map< DtString,
DtOutputPortGroup * > 
DtOutputPortGroupMap
 

Protected Member Functions

void updateFireMissileLauncherTask ()
 
virtual DtReaderWriter * processProvideLastMissileName ()
 
virtual DtReaderWriter * processProvideMissilePassedTarget ()
 
virtual void processObjectRemoved (const DtUUID &missileId)
 
virtual void processDeleteObject (const DtUUID &missileId)
 
virtual bool isSurrenderedLifeform (const DtSimObject *entity) const
 
virtual DtSimTask * createFireTask (const DtRwLocationReference &locRef, const DtU8 hitZoneFunction) const
 
virtual bool bestMunitionForTargetNoSideEffects (const DtRwLocationReference &targetLocation, DtEntityType &munitionTypeOut, DtGenericWeaponInfo::MunitionEvaluationReasons &reasonsOut) const
 
virtual void preFirstTickInit () override
 
 DtLauncherController ()=delete
 
 DtLauncherController (const DtLauncherController &orig)=delete
 
const DtLauncherController & operator= (const DtLauncherController &orig)=delete
 
- Protected Member Functions inherited from DtWeaponController
virtual void addRangeItems ()
 
virtual
DtWeaponInfoInterface::TargetApplicability 
targetApplicability (const DtEntityType &type)
 
virtual bool positionWithinTargetRegion (const DtVector &localPosition)
 
virtual void setupRegionEvaluator ()
 
virtual void updateRegionEvaluator ()
 
virtual double maximumRange ()
 
virtual double minimumRange ()
 
 DtWeaponController ()
 
 DtWeaponController (const DtWeaponController &orig)
 
const DtWeaponController & operator= (const DtWeaponController &orig)
 
const DtEntityTargetInformation createTargetInfo () const
 
bool hasTarget () const
 
virtual const
DtRwLocationReference::LocationType 
targetLocationType () const
 
virtual const
DtEntityTargetInformation 
target () const
 
virtual const DtVector locationTarget () const
 
void setRoundsFiredUponTarget (const int &roundsFired)
 
const int roundsFiredUponTarget () const
 
const int totalRoundsToFireUponTarget () const
 
void setIsExplicitlyTasked (const bool &explicitlyTasked)
 
const bool isExplicitlyTasked () const
 
void setWeaponStatus (const int weaponStatus)
 
const int weaponStatus () const
 
void addWeaponStatus (const DtBaseWeaponComponentInterface::DtWeaponStatus weaponStatus)
 
void removeWeaponStatus (const DtBaseWeaponComponentInterface::DtWeaponStatus weaponStatus)
 
- Protected Member Functions inherited from DtBaseWeaponController
virtual bool createPortGroups () override
 
virtual void lookupAndCacheProcessSR ()
 
virtual DtString weaponId () const
 
virtual bool weaponStowable ()
 
virtual bool weaponStowed ()
 
virtual bool weaponInTransition ()
 
virtual void setWeaponStowed (bool v)
 
virtual void processSetStowWeapon (DtSimMessage *msg)
 
 DtBaseWeaponController ()
 
 DtBaseWeaponController (const DtBaseWeaponController &orig)
 
const DtBaseWeaponController & operator= (const DtBaseWeaponController &orig)
 
- Protected Member Functions inherited from DtSingleTaskControllerComponent
virtual void clearPendingSubtasks ()
 
virtual void clearSubtasksByType (const DtSimTaskMessageType &taskType)
 
virtual void cleanupInactiveSubtaskStatus ()
 
virtual void taskHandlingOnDisable () override
 
- Protected Member Functions inherited from DtTaskControllerComponent
virtual void suspendSubtasksOfTask (int taskId, DtSuspendedTaskInfo *suspendInfo)
 
virtual void suspendSubtaskOfTask (int taskId, int subtaskId, DtSuspendedTaskInfo *suspendInfo)
 
virtual DtSimTaskMessageType remapScriptId (const DtSimTaskMessageType &) const
 
- Protected Member Functions inherited from DtControllerComponent
 DtControllerComponent ()
 
 DtControllerComponent (const DtControllerComponent &orig)
 
const DtControllerComponent & operator= (const DtControllerComponent &orig)
 
virtual void onRestore () override
 
virtual void initializeTargetingControlTableFromDescriptor (const DtReaderWriter *)
 
virtual void sendCapableSetsAndTasks ()
 
- Protected Member Functions inherited from DtSimComponent
virtual void setupTimedTickLogic (double minTickPeriod, double minTickPeriodVariance)
 
virtual double computeCurrentTime ()
 
bool testInvariant () const
 
DtVrfProcessStateRepository * createComponentPsr (const DtString &defaultPsrType, const DtString &defaultPsrName, bool useDescriptorParams=true)
 
virtual void updateTaskVisualizations ()
 
virtual void destroyTaskVisualizations ()
 
virtual void destroyTaskVisualization (const DtString &name)
 
virtual
makVrf::DtPointTaskVisualizationPtr 
pointTaskVisualization (const DtString &name)
 
virtual
makVrf::DtLineTaskVisualizationPtr 
lineTaskVisualization (const DtString &name)
 
virtual
makVrf::DtAreaTaskVisualizationPtr 
areaTaskVisualization (const DtString &name)
 
virtual
makVrf::DtTextTaskVisualizationPtr 
textTaskVisualization (const DtString &name)
 
double calculateNextTaskVisTickTime () const
 
DtVrfObjectStateRepository * localStateRepository ()
 
const DtVrfObjectStateRepository * localStateRepository () const
 
DtPropertyInterface * cachedNextFrameStateProperty (DtPropertyInterface **prop, const DtString &propName)
 
template<typename ValType >
void setCachedNextFrameStatePropertyValue (DtPropertyInterface **prop, const DtString &propName, ValType value)
 
const DtPropertyInterface * cachedCurrentFrameStateProperty (const DtPropertyInterface **prop, const DtString &propName) const
 
template<typename ValType >
bool getCachedCurrentFrameStatePropertyValue (const DtPropertyInterface **prop, const DtString &propName, ValType &value) const
 
void addSimObjectPredicateCallback (DtSimObjectReference simObject, DtVrfObjectPredicateCallbackFunction function, const DtVrfObjectPredicate &predicate, DtTime evaluationPeriod=0, void *userData=0)
 
void removeSimObjectPredicateCallback (const DtSimObject *simObject, DtVrfObjectPredicateCallbackFunction function, const DtVrfObjectPredicate &predicate, DtTime evaluationPeriod=0, void *userData=0)
 
void invokeSimObjectPredicateCallbacks ()
 
virtual void clearPredicateCallbacks ()
 
- Protected Member Functions inherited from DtReaderWriter
virtual void bindToRwAsVariable (const DtReaderWriter *rw)
 

Protected Attributes

double myAbandonPassedMissileDistance
 
bool myRegisteredRemovedCallback = false
 
MissileSimObjectFacadeMap myMissileSimObjectFacadeMap {}
 
tbb::spin_mutex myRemovedMissilesMutex
 
std::vector< DtUUID > myRemovedMissiles {}
 
boost::signals2::scoped_connection myMissileRemovedFromActiveListConnection {}
 
Ports and Port Groups
DtStringOutputPort * myMissileIdPort = nullptr
 
DtIntegerOutputPort * myMunitionBinPort = nullptr
 
DtStringOutputPort * myTargetEntityIdPort = nullptr
 
DtVectorOutputPort * myTargetPointPort = nullptr
 
- Protected Attributes inherited from DtWeaponController
DtUUID myCurrentTarget
 
DtMountingController * myMountingController
 
const
DtWeaponControllerDescriptor * 
myWeaponCtlrDesc
 
DtWeaponComponentInterface * myWeaponComponentInterface
 
DtGenericWeaponInfo * myWeaponInfo
 
std::map< DtString, DtSimMunition > myUsableMunitions
 
double myMaxMunitionEffectiveRange
 
std::shared_ptr
< DtSpatialFilterEvaluator > 
myRegionEvaluator
 
DtTime myLastRegionEvaluatorUpdateTime
 
double myTaskGiveUpTime = -1.0
 
DtBooleanInputPort * myWeaponsHoldPort
 
- Protected Attributes inherited from DtBaseWeaponController
bool myDoWeaponPreload
 
bool myWaitingForFire
 
DtReal myFireMaxVehicleSpeed
 
DtReal myMaxAzimuthAngleOffBoresight
 
DtReal myMaxElevationAngleOffBoresight
 
const
DtBaseWeaponControllerDescriptor * 
myBaseWeaponCtlrDesc
 
DtBaseMountingController * myBaseMountingController
 
DtVrfWeaponPSR * myWeaponProcessState
 
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
 
DtOutputPortGroup * myWeaponOutputPortGroup
 
DtAmmunitionOutputPort * myLoadAmmunitionPort
 
DtBooleanOutputPort * myTriggerPort
 
DtBooleanOutputPort * myLoadedPort
 
DtInputPortGroup * myWeaponInputPortGroup
 
DtIntegerInputPort * myArtPartTypePort
 
DtIntegerInputPort * myStowedStateInputPort
 
DtBooleanOutputPort * myStowCommandOutputPort
 
- Protected Attributes inherited from DtTaskControllerComponent
DtTaskCallbackMap myTaskCallbackMap
 
std::list
< DtTaskProcessorCallbackInfo * > 
myTaskProcessorCallbackInfoList
 
bool myTaskIsRunning
 
- Protected Attributes inherited from DtControllerComponent
DtSimRadio * myRadio
 
bool myTaskTypesEnabled
 
bool myInitialized
 
- Protected Attributes inherited from DtSimComponent
DtLocalObject * myEntity
 
DtComponentSystem * mySystem
 
DtListItem * myListItem
 
DtInputPortMap myInputPortList
 
DtOutputPortMap myOutputPortList
 
DtInputPortGroupMap myInputPortGroupList
 
DtOutputPortGroupMap myOutputPortGroupList
 
int myPriority
 
double myLastTickSimTime
 
std::unique_ptr< DtTimedTickLogic > myTimedTickLogic
 
double myDT
 
bool myIsEnabled
 
bool myFirstTick
 
const DtComponentDescriptor * myComponentDescriptor
 
std::list
< DtVrfProcessStateRepository * > 
myComponentPsrs
 
makVrf::DtTaskVisualizationMap myTaskVisualizations
 
double myNextTaskVisTickTime
 
DtSymbolString myFullComponentName
 
DtSimulationServices * mySimServices
 
DtPredicateCallbackManager * myPredicateCallbackManager
 
boost::signals2::scoped_connection myIsClutterChangedConnection
 
bool myLocalDebug
 
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
 
DtReaderWriterRegistry myRegistry
 
DtReaderWriterRegistry * myParentRegistry
 
bool myValueSpecified
 
bool myReadOnlyFlag
 
bool myIsVariableReference
 
DtSymbolString myVariableName
 
bool myVariableIsBound
 
DtReaderWriter * myDefaultValue
 
aliasContainer myAliases
 
bool myInvalid
 
bool myChangedFlag
 

Private Member Functions

virtual bool isFireMissileLauncherTasked () const override
 
virtual const
DtFireMissileLauncherTask * 
getFireMissileLauncherTask () const override
 
virtual void registerAttributeFunctions () override
 
static DtReaderWriter * provideLastMissileName (void *controller)
 
static DtReaderWriter * provideMissilePassedTarget (void *controller)
 
static DtSimComponent * creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual bool createPorts () override
 
virtual void processFireMissileLauncherTask (DtSimMessage *msg)
 
static void fireMissileLauncherTaskCallback (DtSimMessage *msg, void *usr)
 

Additional Inherited Members

- Public Types inherited from DtTaskControllerComponent
enum  AcceptLevel { AcceptLevel_Accept = 0, AcceptLevel_Partial = 1, AcceptLevel_Error = 2, AcceptLevel_NoAccept = 99 }
 
- Public Types inherited from DtReaderWriter
typedef std::vector
< DtSymbolString > 
aliasContainer
 
typedef std::vector
< DtSymbolString >::iterator 
aliasIter
 
typedef std::vector
< DtSymbolString >
::const_iterator 
aliasConstIter
 
typedef std::vector< DtFilename > SearchPaths
 
typedef std::pair
< DtSymbolString, DtString > 
DtVariableNameType
 
typedef DtReaderWriterFactory *(* DtReaderWriterFactoryCreatorFcn )()
 
- Static Public Member Functions inherited from DtWeaponController
static DtSimComponent * creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
- Static Public Member Functions inherited from DtBaseWeaponController
static DtSimComponent * creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
- Static Public Member Functions inherited from DtTaskControllerComponent
static void deprecatedTaskProcessorCallbackAdapter (DtSimMessage *msg, void *usr, DtSimTaskStatePtr taskState)
 
- Static Public Member Functions inherited from DtSimComponent
static DtSimComponentFactory * factory ()
 
static void setFactory (DtSimComponentFactory *factory)
 
static DtSimComponent * createComponent (const DtString &name, const DtString &type, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentSystem *parentSystem, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
static void addSimComponentCreatorFcn (const DtString &type, DtSimComponentCreatorFcn fcn)
 
static VRF4API_METHOD
DtSimComponent * 
MarkThreadSafe (DtSimComponent *comp)
 
- Static Public Member Functions inherited from DtReaderWriter
static void putIndent (std::string &fp, int indentLevel)
 
static const
DtVariableBindingsList & 
nullVariableReference ()
 
static void setPostGetSelfCallback (DtGetSelfCallbackFcn fcn, void *usrData)
 
static void setPrePutSelfCallback (DtPutSelfCallbackFcn fcn, void *usrData)
 
static void setPutIndent (bool)
 
static bool putIndent ()
 
static const char * theXmlType ()
 
static const DtFilename & appPath ()
 
static void setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn)
 
static void createReaderWriterFactory ()
 
static void cleanupFactory ()
 
static DtReaderWriterFactory * factory ()
 
static void setOutputStream (DtOutputStream *stream)
 
static DtOutputStream & outputStream ()
 
static DtReaderWriter * createFromXmlFile (const DtFilename &, bool createAsProperty=false)
 
static DtReaderWriter * createFromXml (const DtString &, bool createAsProperty=false)
 
static DtReaderWriter * createFromEnvironment (DtEnvironmentSP, bool createAsProperty=false)
 
static DtString getAttribute (DtEnvironmentSP env, const DtString &name, DtEnvValueSP root)
 
- Public Attributes inherited from DtSingleTaskControllerComponent
const DtString TaskStatusRunning = "TaskRunning"
 
const DtString TaskStatusNotActive = "TaskNotActive"
 
- Static Protected Member Functions inherited from DtBaseWeaponController
static void setStowWeaponCallback (DtSimMessage *msg, void *usrData)
 
- Static Protected Attributes inherited from DtSimComponent
static DtSimComponentFactory * myFactory
 
- Static Protected Attributes inherited from DtReaderWriter
static DtString theUnspecifiedValue
 
static DtGetSelfCallbackInfo thePostGetSelfCallback
 
static DtPutSelfCallbackInfo thePrePutSelfCallback
 
static const DtVariableBindingsList theEmptyVariableBindingsList
 
static bool theCreatorFcnSet
 
static DtReaderWriterFactory * theFactory
 
static
DtReaderWriterFactoryCreatorFcn 
theFactoryCreatorFcn
 
static bool thePutIndent
 
static DtOutputStream * theOutputStream
 

Member Typedef Documentation

Constructor & Destructor Documentation

DtLauncherController::DtLauncherController ( const DtString &  name,
DtLocalObject *  owner,
DtSimulationServices *  simManager,
DtComponentDescriptor *  desc = nullptr,
DtReaderWriterRegistry *  parentRegistry = nullptr 
)

Parameters
nameReader writer name of this component.
ownerThe DtLocalObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
virtual DtLauncherController::~DtLauncherController ( )
overridevirtual

destructor

DtLauncherController::DtLauncherController ( )
protecteddelete

default constructor; not implemented

DtLauncherController::DtLauncherController ( const DtLauncherController &  orig)
protecteddelete

copy constructor; not implemented

Member Function Documentation

virtual bool DtLauncherController::init ( )
overridevirtual

Overridden to initialize values obtained from the descriptor.

Reimplemented from DtWeaponController.

Reimplemented in DtJavelinLauncherController.

virtual void DtLauncherController::registerTaskMsgCallbacks ( )
overridevirtual

Registers callbacks for task messages.

Reimplemented from DtTaskControllerComponent.

Reimplemented in DtJavelinLauncherController.

virtual AcceptLevel DtLauncherController::acceptTask ( const DtTaskMessage &  task)
overridevirtual

Only accept tasks for which this controller has the named resource and the quantity of that resource is greater than 0.

Reimplemented from DtTaskControllerComponent.

virtual const char* DtLauncherController::type ( ) const
overridevirtual

Returns a string identifies the class type of component. Type values are defined in compTypes.h. DtSimComponent creation functions are registered with the DtSimComponentFactory using the type values as the key. Warning: this function should always return the same pointer and it should be valid forever. This means the data should be static.

Returns
DtLauncherControllerType

Reimplemented from DtWeaponController.

Reimplemented in DtJavelinLauncherController, and DtVerticalLauncherController.

virtual void DtLauncherController::tick ( )
overridevirtual

Calculate new control values.

Reimplemented from DtWeaponController.

virtual bool DtLauncherController::createMissileIdPort ( )
virtual

These are called in init to create the ports used to communicate with the actuator.

virtual bool DtLauncherController::createTargetPointPort ( )
virtual
virtual bool DtLauncherController::createTargetEntityIdPort ( )
virtual
virtual void DtLauncherController::fire ( )
overridevirtual

Creates and initializes a new missile object. Sets the missile to be created as part of the actuator.

Reimplemented from DtWeaponController.

virtual void DtLauncherController::missileDetonated ( const makVrfEvents::DtDetonationEvent *  detInter)
virtual

For removing missile entities from local list after they are destroyed. Takes a makVrfEvents::DtDetonationEvent as an argument. It goes through its list of active missiles, searching for an ID that matches the munition ID specified in the makVrfEvents::DtDetonationEvent. If it is found, it calls removeMissileFromActiveList(), to remove and delete the missile DtUUID in the active missiles list.

virtual void DtLauncherController::detonationCallback ( const makVrfEvents::DtEvent &  e)
virtual

This callback function is registered with the exercise connection to handle incoming makVrfEvents::DtDetonationEvents. It calls missileDetonated() to process the interaction.

virtual void DtLauncherController::disconnectMissileFromLauncher ( const DtUUID &  missId)
virtual

Takes a DtEntityIdentifier of a missile as an argument. If the missile is found in the active missiles list, it looks up the missile object by DtEntityIdentifier in the DtSimObjectManager. If found, it calls DtMissileStateRepository::setDisconnectedFromLauncher(), and removes and deletes the missile DtEntityIdentifier from the active missiles list. The second version of this function takes a missile object as an argument. It calls down to the first version of the function to perform the actual work.

virtual DtSimObjectReference DtLauncherController::mostRecentMissileFired ( )
virtual

Returns the most recent missile fired (and still connected) or NULL.

virtual bool DtLauncherController::missilePassedTarget ( const DtMissileSimObjectFacade &  lastMissile,
double &  distSquaredToTargetOut 
)
virtual

Returns whether the last fired missile has passed it's target or not. The current distance squared to the target will be returned in distSquaredToTargetOut.

virtual double DtLauncherController::abandonPassedMissileDistance ( )
virtual
virtual void DtLauncherController::setAbandonPassedMissileDistance ( const double &  distance)
virtual
virtual void DtLauncherController::registerAttributeFunctions ( )
overridevirtual

Attribute functions:Overrides the simComponent version to register the functions below.

Reimplemented from DtSimComponent.

static DtReaderWriter* DtLauncherController::provideLastMissileName ( void *  controller)
static

Function to be registered as a provider with the parent component system for the launched-munition-name attribute. Calls processProvideLastMissileName.

static DtReaderWriter* DtLauncherController::provideMissilePassedTarget ( void *  controller)
static

Function to be registered as a provider with the parent component system for the missile-passed-target attribute. Calls processProvideMissilePassedTarget.

static DtSimComponent* DtLauncherController::creator ( const DtString &  name,
DtLocalObject *  owner,
DtSimulationServices *  simManager,
DtComponentDescriptor *  desc = nullptr,
DtReaderWriterRegistry *  parentRegistry = nullptr 
)
static

Parameters
nameReader writer name of this component.
ownerThe DtLocalObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
Returns
New instance of this class.
virtual bool DtLauncherController::createPorts ( )
overrideprotectedvirtual

Overridden to create the launcher's ports.

Reimplemented from DtWeaponController.

static void DtLauncherController::fireMissileLauncherTaskCallback ( DtSimMessage *  msg,
void *  usr 
)
staticprotected

Called when a fire-at-target-missile-launcher message is received.

Processes DtFireMissileLauncherTask task. Assigns the target to the weapon and process the firing.

virtual void DtLauncherController::processFireMissileLauncherTask ( DtSimMessage *  msg)
protectedvirtual

Retrieves the entity to fire at from the task message.

Called by fireMissileLauncherTaskCallback.

void DtLauncherController::updateFireMissileLauncherTask ( )
protected

Completes the FireMissileLauncherTask if the conditions are met.

  • i.e. target destroyed, requested rounds fired, etc.
virtual DtReaderWriter* DtLauncherController::processProvideLastMissileName ( )
protectedvirtual

Provides the name (DtRwString) of the missile that was last launched.

virtual DtReaderWriter* DtLauncherController::processProvideMissilePassedTarget ( )
protectedvirtual

Provides result of whether the current missile has passed the target or not (DtRwBoolean)

virtual void DtLauncherController::processObjectRemoved ( const DtUUID &  missileId)
protectedvirtual
virtual void DtLauncherController::processDeleteObject ( const DtUUID &  missileId)
protectedvirtual
virtual bool DtLauncherController::isSurrenderedLifeform ( const DtSimObject *  entity) const
protectedvirtual

Check for surrendered lifeform state.

virtual DtSimTask* DtLauncherController::createFireTask ( const DtRwLocationReference &  locRef,
const DtU8  hitZoneFunction 
) const
protectedvirtual

Reimplemented in DtJavelinLauncherController.

virtual bool DtLauncherController::bestMunitionForTargetNoSideEffects ( const DtRwLocationReference &  targetLocation,
DtEntityType &  munitionTypeOut,
DtGenericWeaponInfo::MunitionEvaluationReasons &  reasonsOut 
) const
protectedvirtual

Side-effect-free query used by DtGenericWeaponInfo::bestMunitionForTarget() (and hence by autonomous-fire Lua) to report which munition this launcher would load for the given target. Walks the ammo-select table exactly like DtWeaponController::chooseAmmo(), but without touching the loader or current-munition state. Skips the ballistic reachability check because missiles are guided.

Returns
true if a stocked munition was found for the target.
virtual void DtLauncherController::preFirstTickInit ( )
overrideprotectedvirtual

Initializes the myMissileSimObjectFacadeMap.

Reimplemented from DtWeaponController.

const DtLauncherController& DtLauncherController::operator= ( const DtLauncherController &  orig)
protecteddelete

assignment operator; not implemented

virtual bool DtLauncherController::isFireMissileLauncherTasked ( ) const
overrideprivatevirtual

The following private function are created temporarily during the weapon system refactoring. Their purpose is to bypass the target weapon interface and the target selection controller, when the new DtFireMissileLauncherTask is executed. The functions should be removed / replaced / modified as the refactoring goes along.

Used for pre VRF-5.1 scenarios - should be deprecated

Reimplemented from DtWeaponController.

virtual const DtFireMissileLauncherTask* DtLauncherController::getFireMissileLauncherTask ( ) const
overrideprivatevirtual

The following private function are created temporarily during the weapon system refactoring. Their purpose is to bypass the target weapon interface and the target selection controller, when the new DtFireMissileLauncherTask is executed. The functions should be removed / replaced / modified as the refactoring goes along.

Used for pre VRF-5.1 scenarios - should be deprecated

Reimplemented from DtWeaponController.

Member Data Documentation

DtStringOutputPort* DtLauncherController::myMissileIdPort = nullptr
protected

Output Port Name: missile-id
Output Port Description: Object id of the missile.
Output Port Range:
Output Port Default Value:
Output Group Parent: weapon-control.

DtIntegerOutputPort* DtLauncherController::myMunitionBinPort = nullptr
protected

Output Port Name: munition-bin
Output Port Description: Bin the munition resource is in.
Output Port Range:
Output Port Default Value:
Output Group Parent: weapon-control.

DtStringOutputPort* DtLauncherController::myTargetEntityIdPort = nullptr
protected

Output Port Name: target-entity
Output Port Description: Object id of the target.
Output Port Range:
Output Port Default Value:
Output Group Parent: weapon-control.

DtVectorOutputPort* DtLauncherController::myTargetPointPort = nullptr
protected

Output Port Name: target-point
Output Port Description: Local position of the target.
Output Port Range:
Output Port Default Value:
Output Group Parent: weapon-control.

double DtLauncherController::myAbandonPassedMissileDistance
protected

If the missile passes its target within this distance, it will be abandoned and disconnected from the launcher. Defaults to 100 meters.

bool DtLauncherController::myRegisteredRemovedCallback = false
protected
MissileSimObjectFacadeMap DtLauncherController::myMissileSimObjectFacadeMap {}
protected
tbb::spin_mutex DtLauncherController::myRemovedMissilesMutex
mutableprotected
std::vector<DtUUID> DtLauncherController::myRemovedMissiles {}
protected
boost::signals2::scoped_connection DtLauncherController::myMissileRemovedFromActiveListConnection {}
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)