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

End User Description: This is a missile launcher controller/actuator combination (does not need to be used with a launcher actuator) which monitors the surroundings for a laser designator with a matching laser code to the one in this launcher, and if it is within the launch cone, launches a missile targeted at this designator. This controller processes DtSetLaserCodeRequest and DtSetSyncLaserCode messages to set the laser code. Uses Descriptor Type: DtLaserGuidedLauncherControllerDescriptor.

Inheritance diagram for DtLaserGuidedLauncherController:
Inheritance graph
[legend]

Public Member Functions

 DtLaserGuidedLauncherController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *compDesc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtLaserGuidedLauncherController ()
 
virtual const chartype () const override
 
virtual bool init () override
 
virtual void setComponentDescriptor (DtComponentDescriptor *compDesc) override
 
virtual bool createPSR ()
 
virtual void preFirstTickInit () override
 
virtual void tick () override
 
virtual
DtTaskControllerComponent::AcceptLevel 
acceptTask (const DtTaskMessage &task) override
 
virtual void clearTask () override
 
- Public Member Functions inherited from DtSingleTaskControllerComponent
 DtSingleTaskControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *compDesc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtSingleTaskControllerComponent ()
 
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 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< intcurrentPendingSubstaskIds () const
 
virtual DtSubtaskStatusEntrysubtaskStatus (int subtaskId)
 
virtual void clearCurrentTaskMessage ()
 
virtual DtTaskMessagecurrentTaskMessage () 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 DtSuspendedTaskInfosuspendTaskById (int taskId) override
 
virtual DtSuspendedTaskInfosuspendSubtaskById (int taskId, int subtaskId) override
 
virtual std::list
< DtTaskMessage * > 
currentTaskMessages () const
 
virtual DtTaskWithTaskStateListPtr topLevelTasks () const override
 
virtual void disable () override
 
- Public Member Functions inherited from DtTaskControllerComponent
 DtTaskControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *compDesc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtTaskControllerComponent ()
 
virtual bool showCurrentTaskInGui () const
 
virtual void setRadio (DtSimRadio *radio) override
 
virtual void addTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtTaskMessageCallbackFcn fcn, void *usr)
 
virtual void addTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtMessageCallbackFcn fcn, void *usr)
 
virtual void removeTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtMessageCallbackFcn fcn, void *usr)
 
virtual void removeTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtTaskMessageCallbackFcn fcn, void *usr)
 
virtual void enable () override
 
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 ()
 
virtual bool postAddComponentsInit () override
 
virtual DtSimRadioradio ()
 
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 ()
 
virtual void setParentSystem (DtComponentSystem *system)
 
DtComponentSystemparentSystem () const
 
virtual void timedTick ()
 
virtual void setMinTickPeriod (double minTickPeriod, double minTickPeriodVariance)
 
virtual void setupFirstTickTime ()
 
virtual void setEntity (DtLocalObject *entity)
 
virtual DtSimComponentnextComponent ()
 
virtual DtSimComponentprevComponent ()
 
virtual void setListItem (DtListItem *item)
 
virtual DtListItem * listItem ()
 
virtual void putData (std::string &fp, int indentLevel=0)
 
virtual DtlObjPtr getData (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
 
virtual void addInputPort (DtInputPort *port)
 
virtual void removeInputPort (DtInputPort *port)
 
virtual DtInputPortlookupInputPort (const DtString &portName)
 
virtual DtList inputPortList () const
 
virtual void addOutputPort (DtOutputPort *port)
 
virtual void removeOutputPort (DtOutputPort *port)
 
virtual DtOutputPortlookupOutputPort (const DtString &portName)
 
virtual DtList outputPortList () const
 
virtual void addInputPortGroup (DtInputPortGroup *group)
 
virtual void removeInputPortGroup (DtInputPortGroup *group)
 
virtual DtInputPortGrouplookupInputPortGroup (const DtString &groupName)
 
virtual DtList inputPortGroupList () const
 
virtual void addOutputPortGroup (DtOutputPortGroup *group)
 
virtual void removeOutputPortGroup (DtOutputPortGroup *group)
 
virtual DtOutputPortGrouplookupOutputPortGroup (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 const
DtComponentDescriptor
componentDescriptor () const
 
virtual bool tickWhileDestroyed () const
 
DtVrfProcessStateRepositoryManagerpsrManager ()
 
virtual const DtSymbolStringcomponentFullName () const
 
DtPhysicalWorldphysicalWorld ()
 
const DtPhysicalWorldphysicalWorld () const
 
const DtAttachedTerrainterrainAttachedTo () const
 
DtLocalObjectentity ()
 
const DtLocalObjectentity () const
 
DtSimulationServicessimulationServices ()
 
const DtSimulationServicessimulationServices () const
 
const Coordinate_SystemcoordinateSystem () const
 
virtual void isClutterChanged ()
 
virtual bool taskVisualizationsEnabled () const
 
makVrf::DtTaskVisualizationMaptaskVisualizations ()
 
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 DtSimResourceManagerresourceManager ()
 
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 DtReaderWriteroperator= (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 aliasContaineraliases () 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 charreaderWriterType () const
 
virtual const charxmlType () 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 DtReaderWriterdefaultRWValue () const
 
virtual DtReaderWriterdefaultRWValue ()
 
virtual void setDefaultRWValue (DtReaderWriter *)
 
virtual bool checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
const DtReaderWriterRegistryregistry () const
 
DtReaderWriterRegistryregistry ()
 
virtual DtPropertyInterfaceproperty ()
 
virtual const DtPropertyInterfaceproperty () const
 
virtual DtString toXml () const
 
virtual DtRwVariableBindingsgenerateVariableBindings () 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)
 

Static Public Member Functions

static DtSimComponentcreator (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 DtSimComponentFactoryfactory ()
 
static void setFactory (DtSimComponentFactory *factory)
 
static DtSimComponentcreateComponent (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 chartheXmlType ()
 
static const DtFilename & appPath ()
 
static void setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn)
 
static void createReaderWriterFactory ()
 
static void cleanupFactory ()
 
static DtReaderWriterFactoryfactory ()
 
static void setOutputStream (DtOutputStream *stream)
 
static DtOutputStream & outputStream ()
 
static DtReaderWritercreateFromXmlFile (const DtFilename &, bool createAsProperty=false)
 
static DtReaderWritercreateFromXml (const DtString &, bool createAsProperty=false)
 
static DtReaderWritercreateFromEnvironment (DtEnvironmentSP, bool createAsProperty=false)
 
static DtString getAttribute (DtEnvironmentSP env, const DtString &name, DtEnvValueSP root)
 

Protected Member Functions

virtual void registerTaskMsgCallbacks () override
 
virtual void processFireLaserGuidedMissileTask (DtSimMessage *msg)
 
virtual bool fireWithoutDesignator ()
 
virtual void addRangeItems ()
 
virtual bool createPorts () override
 
virtual bool missileResourceAvailable () const
 
virtual void consumeMissileResource ()
 
virtual bool fireMunition (const makVrf::DtLaserDesignatorStateComponent *target)
 
virtual DtCreateObjectHandle createMissileObject (int laserCode, const DtString &eventId, const std::map< DtString, DtString > &extendedData=std::map< DtString, DtString >())
 
virtual void createAndSendFireInteraction (DtCreateObjectHandle missile, const makVrf::DtLaserDesignatorStateComponent *targetDesignator, const DtString &eventId)
 
virtual const
makVrf::DtLaserDesignatorStateComponent
chooseTarget (bool &targetInFireCone, DtVector &targetLocalPosition) const
 
virtual bool targetDesginatorValid (const makVrf::DtLaserDesignatorStateComponent &target, DtVector &targetLocalPosition) const
 
virtual bool targetDesginatorInFireCone (const makVrf::DtLaserDesignatorStateComponent &target) const
 
virtual bool munitionLoaded () const
 
virtual DtVector launcherGeocentricPosition () const
 
virtual DtVector launcherLocalPosition () const
 
virtual bool missileInFlight ()
 
virtual int defaultLaserCode () const
 
virtual bool canFireAtBasedOnTargetPriorityListRoe (DtSimObjectReference) const
 
- Protected Member Functions inherited from DtSingleTaskControllerComponent
virtual void clearPendingSubtasks ()
 
virtual void clearSubtasksByType (const DtSimTaskMessageType &taskType)
 
virtual void cleanupInactiveSubtaskStatus ()
 
- 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 DtControllerComponentoperator= (const DtControllerComponent &orig)
 
virtual void onRestore ()
 
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
 
virtual bool createPortGroups ()
 
DtVrfProcessStateRepositorycreateComponentPsr (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
 
DtVrfObjectStateRepositorylocalStateRepository ()
 
const DtVrfObjectStateRepositorylocalStateRepository () const
 
DtPropertyInterfacecachedNextFrameStateProperty (DtPropertyInterface **prop, const DtString &propName)
 
template<typename ValType >
void setCachedNextFrameStatePropertyValue (DtPropertyInterface **prop, const DtString &propName, ValType value)
 
const DtPropertyInterfacecachedCurrentFrameStateProperty (const DtPropertyInterface **prop, const DtString &propName) const
 
template<typename ValType >
bool getCachedCurrentFrameStatePropertyValue (const DtPropertyInterface **prop, const DtString &propName, ValType &value) const
 
void addSimObjectPredicateCallback (DtSimObjectReference, DtVrfObjectPredicateCallbackFunction function, const DtVrfObjectPredicate &predicate, DtTime evaluationPeriod=0, void *userData=0)
 
void removeSimObjectPredicateCallback (const DtSimObject *, 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)
 

Static Protected Member Functions

static void fireLaserGuidedMissileCallback (DtSimMessage *msg, void *usr)
 

Protected Attributes

const
DtIntegratedLaserGuidedLauncherDescriptor
myDescriptor
 
DtLaserLauncherPSRmyProcessState
 
bool myTargetWasFoundLastTick
 
bool myWasTaskedToFireAtTarget
 
bool myWarnedForLostTarget
 
DtMovementLocalObjectFacade myMovementLocalObjectFacade
 
DtGenericWeaponInfomyWeaponInfo
 
Ports and Port Groups
DtVectorOutputPortmyTargetLocationOutputPort
 
- Protected Attributes inherited from DtTaskControllerComponent
DtTaskCallbackMap myTaskCallbackMap
 
std::list
< DtTaskProcessorCallbackInfo * > 
myTaskProcessorCallbackInfoList
 
bool myTaskIsRunning
 
- Protected Attributes inherited from DtControllerComponent
DtSimRadiomyRadio
 
bool myTaskTypesEnabled
 
bool myInitialized
 
- Protected Attributes inherited from DtSimComponent
DtLocalObjectmyEntity
 
DtComponentSystemmySystem
 
DtListItem * myListItem
 
DtInputPortMap myInputPortList
 
DtOutputPortMap myOutputPortList
 
DtInputPortGroupMap myInputPortGroupList
 
DtOutputPortGroupMap myOutputPortGroupList
 
int myPriority
 
double myLastTickSimTime
 
std::unique_ptr< DtTimedTickLogicmyTimedTickLogic
 
double myDT
 
bool myIsEnabled
 
bool myFirstTick
 
const DtComponentDescriptormyComponentDescriptor
 
std::list
< DtVrfProcessStateRepository * > 
myComponentPsrs
 
makVrf::DtTaskVisualizationMap myTaskVisualizations
 
double myNextTaskVisTickTime
 
DtSymbolString myFullComponentName
 
DtSimulationServicesmySimServices
 
DtPredicateCallbackManagermyPredicateCallbackManager
 
boost::signals2::scoped_connection myIsClutterChangedConnection
 
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
 
DtReaderWriterRegistry myRegistry
 
DtReaderWriterRegistrymyParentRegistry
 
bool myValueSpecified
 
bool myReadOnlyFlag
 
bool myIsVariableReference
 
DtSymbolString myVariableName
 
bool myVariableIsBound
 
DtReaderWritermyDefaultValue
 
aliasContainer myAliases
 
bool myInvalid
 
bool myChangedFlag
 

Private Member Functions

 DtLaserGuidedLauncherController ()
 
 DtLaserGuidedLauncherController (const DtLaserGuidedLauncherController &orig)
 
DtLaserGuidedLauncherControlleroperator= (const DtLaserGuidedLauncherController &orig)
 
virtual void processSetLaserCodeRequestMessage (DtSimMessage *msg)
 
static void setLaserCodeRequestCallback (DtSimMessage *msg, void *usrData)
 
virtual void processSetSyncLaserCode (DtSimMessage *msg)
 
static void setSyncLaserCodeCallback (DtSimMessage *msg, void *usr)
 
virtual void registerAttributeFunctions () override
 
virtual DtReaderWriterprocessProvideLastMissileName ()
 
static DtReaderWriterprovideLastMissileName (void *controller)
 

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 )()
 
- 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
 
- Static Protected Attributes inherited from DtSimComponent
static DtSimComponentFactorymyFactory
 
- Static Protected Attributes inherited from DtReaderWriter
static DtString theUnspecifiedValue
 
static DtGetSelfCallbackInfo thePostGetSelfCallback
 
static DtPutSelfCallbackInfo thePrePutSelfCallback
 
static const DtVariableBindingsList theEmptyVariableBindingsList
 
static bool theCreatorFcnSet
 
static DtReaderWriterFactorytheFactory
 
static
DtReaderWriterFactoryCreatorFcn 
theFactoryCreatorFcn
 
static bool thePutIndent
 
static DtOutputStream * theOutputStream
 

Constructor & Destructor Documentation

DtLaserGuidedLauncherController::DtLaserGuidedLauncherController ( )
private

Not implemented.

DtLaserGuidedLauncherController::DtLaserGuidedLauncherController ( const DtLaserGuidedLauncherController orig)
private

Not implemented.

DtLaserGuidedLauncherController::DtLaserGuidedLauncherController ( const DtString name,
DtLocalObject owner,
DtSimulationServices simManager,
DtComponentDescriptor compDesc = 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 DtLaserGuidedLauncherController::~DtLaserGuidedLauncherController ( )
virtual

Destructor.

Member Function Documentation

DtLaserGuidedLauncherController& DtLaserGuidedLauncherController::operator= ( const DtLaserGuidedLauncherController orig)
private

Not implemented.

virtual const char* DtLaserGuidedLauncherController::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
DtLaserGuidedLauncherControllerType

Implements DtTaskControllerComponent.

Reimplemented in DtIntegratedLaserGuidedLauncherController.

virtual bool DtLaserGuidedLauncherController::init ( )
overridevirtual

Initialize the component. Calls createPSR() and registerRadioMessageCallbacks()

Reimplemented from DtControllerComponent.

Reimplemented in DtIntegratedLaserGuidedLauncherController.

virtual void DtLaserGuidedLauncherController::setComponentDescriptor ( DtComponentDescriptor compDesc)
overridevirtual

Overridden to get the specialized DtLaserGuidedLauncherControllerDescriptor.

Reimplemented from DtSimComponent.

virtual bool DtLaserGuidedLauncherController::createPSR ( )
virtual

Creates myProcessState data member, and adds it to our process state repository manager. Passes in the name and type specified in the component descriptor (if they exist) to the DtVrfProcessStateRepository::createRepository factory method. If name and/or type is not specified, uses the appropriate default strings defined in procSRTypes.h.

virtual void DtLaserGuidedLauncherController::preFirstTickInit ( )
overridevirtual

If the designator code from the PSR is < 0, sets the code in the PSR to defaultLaserCode() and otherwise sets to to the current code from the descriptor.

Reimplemented from DtSimComponent.

virtual void DtLaserGuidedLauncherController::tick ( )
overridevirtual

Tick Function.

Reimplemented from DtSimComponent.

virtual DtTaskControllerComponent::AcceptLevel DtLaserGuidedLauncherController::acceptTask ( const DtTaskMessage task)
overridevirtual

Called by the task manager when this controller is being considered to execute a task. Only tasks which already match types that this controller has registered for will be passed. This is used for the case where multiple task controllers have registered for the same task type. This gives the controller a chance to look at the parameters of the task and to reject the execution of the task based on parameters. Controllers can return any of the AcceptLevel levels. The task manager will choose a controller with the lowest AcceptLevel to execute, but will not choose any controller that returns AcceptLevel_NoAccept. Default implementation returns AcceptLevel_Accept. Override this to check parameters and conditionally return a different AccpetLevel.

Reimplemented from DtTaskControllerComponent.

virtual void DtLaserGuidedLauncherController::clearTask ( )
overridevirtual

If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false, and calls clearCurrentTaskMesage() to clear out the current task message.

Reimplemented from DtSingleTaskControllerComponent.

static DtSimComponent* DtLaserGuidedLauncherController::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 void DtLaserGuidedLauncherController::registerTaskMsgCallbacks ( )
overrideprotectedvirtual

Reimplemented from DtTaskControllerComponent.

static void DtLaserGuidedLauncherController::fireLaserGuidedMissileCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected
virtual void DtLaserGuidedLauncherController::processFireLaserGuidedMissileTask ( DtSimMessage msg)
protectedvirtual
virtual bool DtLaserGuidedLauncherController::fireWithoutDesignator ( )
protectedvirtual

Returns the fireWithoutDesignator flag from the current task, if tasked.

virtual void DtLaserGuidedLauncherController::addRangeItems ( )
protectedvirtual

Adds all items that have a range to the object state repository.

virtual bool DtLaserGuidedLauncherController::createPorts ( )
overrideprotectedvirtual

Called by init. Derived classes should override this method to create all their input/output ports and port groups.

Reimplemented from DtSimComponent.

Reimplemented in DtIntegratedLaserGuidedLauncherController.

virtual bool DtLaserGuidedLauncherController::missileResourceAvailable ( ) const
protectedvirtual

Returns true if there is at least one missile resource remaining of the type specified in the parameter entry.

virtual void DtLaserGuidedLauncherController::consumeMissileResource ( )
protectedvirtual

Decrements the missile resource by one.

virtual bool DtLaserGuidedLauncherController::fireMunition ( const makVrf::DtLaserDesignatorStateComponent target)
protectedvirtual

Does all actions for creating and firing the munition. target is optional.

virtual DtCreateObjectHandle DtLaserGuidedLauncherController::createMissileObject ( int  laserCode,
const DtString eventId,
const std::map< DtString, DtString > &  extendedData = std::map< DtStringDtString >() 
)
protectedvirtual

Creates a new vrf object for the missile using the type and offset parameters specified in the descriptor. Returns a pointer to the newly created object. Pass additional extended data to add to the created object.

virtual void DtLaserGuidedLauncherController::createAndSendFireInteraction ( DtCreateObjectHandle  missile,
const makVrf::DtLaserDesignatorStateComponent targetDesignator,
const DtString eventId 
)
protectedvirtual

Creates the fire interaction for launching of the specified missile. Target information is taken from currentTaskMessage().

virtual const makVrf::DtLaserDesignatorStateComponent* DtLaserGuidedLauncherController::chooseTarget ( bool targetInFireCone,
DtVector targetLocalPosition 
) const
protectedvirtual

Chooses an appropriate designator object as the target to engage. Uses targetDesignatorValid() to check if each potential target is valid.

Returns
The target. Returns NULL if no target.
Parameters
targetInFireConeThis bool is returned by the function, indicating whether the returned target is within the firing cone defined by the descriptor.
targetLocalPositionThis will contain the local database position of the target if a target is returned by this function.
virtual bool DtLaserGuidedLauncherController::targetDesginatorValid ( const makVrf::DtLaserDesignatorStateComponent target,
DtVector targetLocalPosition 
) const
protectedvirtual
Returns
True if the provided target is valid. Checks for a clear LOS to the target, as well as if the laser code of the designator matches the code set for this launcher. Does not check if the target is in the fire cone or not.
Parameters
targetLocalPositionFills in the database location of the target to this parameter.
virtual bool DtLaserGuidedLauncherController::targetDesginatorInFireCone ( const makVrf::DtLaserDesignatorStateComponent target) const
protectedvirtual
Returns
True if the designator is within the defined fire cone.
virtual bool DtLaserGuidedLauncherController::munitionLoaded ( ) const
protectedvirtual
Returns
True when enough time has passed since the last munition fired to fire another.
virtual DtVector DtLaserGuidedLauncherController::launcherGeocentricPosition ( ) const
protectedvirtual
Returns
The geocentric position of the launcher, using the entity's current position, and the launcher offset from the descriptor.
virtual DtVector DtLaserGuidedLauncherController::launcherLocalPosition ( ) const
protectedvirtual
Returns
The local position of the launcher, using the entity's current position, and the launcher offset from the descriptor.
virtual bool DtLaserGuidedLauncherController::missileInFlight ( )
protectedvirtual
Returns
True if the last missile fired by this launcher still exists.
virtual int DtLaserGuidedLauncherController::defaultLaserCode ( ) const
protectedvirtual
Returns
The default laser code. Calls generateLaserCodeFromName().
virtual bool DtLaserGuidedLauncherController::canFireAtBasedOnTargetPriorityListRoe ( DtSimObjectReference  ) const
protectedvirtual
Returns
True if AI enabled and ROE is fire only at target on priority list and lase is lasing a target, not just a location
static void DtLaserGuidedLauncherController::setLaserCodeRequestCallback ( DtSimMessage msg,
void *  usrData 
)
staticprotected

Processes set laser code requests.

virtual void DtLaserGuidedLauncherController::processSetLaserCodeRequestMessage ( DtSimMessage msg)
protectedvirtual

Processes set laser code requests.

static void DtLaserGuidedLauncherController::setSyncLaserCodeCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected

Processes the sync laser code requests by sending a message requesting the laser code from the target entity.

virtual void DtLaserGuidedLauncherController::processSetSyncLaserCode ( DtSimMessage msg)
protectedvirtual

Processes the sync laser code requests by sending a message requesting the laser code from the target entity.

virtual void DtLaserGuidedLauncherController::registerAttributeFunctions ( )
overrideprotectedvirtual

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

Reimplemented from DtSimComponent.

static DtReaderWriter* DtLaserGuidedLauncherController::provideLastMissileName ( void *  controller)
staticprotected

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

virtual DtReaderWriter* DtLaserGuidedLauncherController::processProvideLastMissileName ( )
protectedvirtual

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

Member Data Documentation

const DtIntegratedLaserGuidedLauncherDescriptor* DtLaserGuidedLauncherController::myDescriptor
protected

Pointer to my descriptor.

DtLaserLauncherPSR* DtLaserGuidedLauncherController::myProcessState
protected

Container for state data associated with this component. This state is saved and restored as part of a scenario (or checkpoint).

DtVectorOutputPort* DtLaserGuidedLauncherController::myTargetLocationOutputPort
protected

Output Port Name: target-location
Output Port Description: Provides the local database location of the best available laser spot target that is found by this launcher. Provided so that it can be hooked to movement system of entities that need to reorient to fire on the target.
Output Port Range: Local database locations.
.

bool DtLaserGuidedLauncherController::myTargetWasFoundLastTick
protected

A state variable to remember that a target was found the tick before the current tick; used to delay the launching of a missile for one tick, to make sure the target is still valid and not just left over from a previous tick.

bool DtLaserGuidedLauncherController::myWasTaskedToFireAtTarget
mutableprotected

Will be set to true if permissionToFire was because of a fire at target task.

bool DtLaserGuidedLauncherController::myWarnedForLostTarget
protected

Indicates that a warning was already displayed when the current target was lost.

DtMovementLocalObjectFacade DtLaserGuidedLauncherController::myMovementLocalObjectFacade
protected
DtGenericWeaponInfo* DtLaserGuidedLauncherController::myWeaponInfo
protected

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

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)