17 #include <boost/signals2.hpp>
18 #include <tbb/spin_mutex.h>
20 class DtLauncherControllerDescriptor;
24 namespace makVrfEvents
79 virtual bool init()
override;
90 virtual const char*
type()
const override;
93 virtual void tick()
override;
97 virtual bool createMissileIdPort();
98 virtual bool createTargetPointPort();
99 virtual bool createTargetEntityIdPort();
103 virtual void fire()
override;
126 virtual void disconnectMissileFromLauncher(
const DtUUID& missId);
136 virtual double abandonPassedMissileDistance();
137 virtual void setAbandonPassedMissileDistance(
const double&
distance);
152 static DtReaderWriter* provideMissilePassedTarget(
void* controller);
174 static void fireMissileLauncherTaskCallback(
DtSimMessage* msg,
void* usr);
179 virtual void processFireMissileLauncherTask(
DtSimMessage* msg);
184 void updateFireMissileLauncherTask();
192 virtual void processObjectRemoved(
const DtUUID& missileId);
194 virtual void processDeleteObject(
const DtUUID& missileId);
197 virtual bool isSurrenderedLifeform(
const DtSimObject* entity)
const;
UUID is a unique ID wrapper class.
Definition: uuid.h:59
tbb::spin_mutex myRemovedMissilesMutex
Definition: launcherController.h:285
DtUUID uuid
Definition: launcherController.h:243
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtVectorOutputPort * myTargetPointPort
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.
Definition: launcherController.h:271
virtual bool createPorts() override
Overridden to create the local ports.
const DtWeaponController & operator=(const DtWeaponController &orig)
assignment operator; not implemented
Instances of DtStringOutputPort are output ports through which data producers can send a DtString obj...
Definition: stringIOPort.h:52
Task for firing the missile launcher at a target.
Definition: fireMissileLauncherTask.h:25
DtWeaponController is a controller that extends the DtBaseWeaponController with the ability to accept...
Definition: weaponController.h:59
virtual void registerTaskMsgCallbacks()
AcceptLevel
Levels that a task controller can accept a task it has registered for.
Definition: taskControllerComponent.h:55
Holds a position of some form. May be an absolute position, or a reference to another object...
Definition: rwLocationReference.h:25
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
bool myRegisteredRemovedCallback
Definition: launcherController.h:280
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
Definition: detonationEvent.h:20
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
DtStringOutputPort * myTargetEntityIdPort
Output Port Name: target-entity Output Port Description: Object id of the target. Output Port Range: ...
Definition: launcherController.h:264
MissileSimObjectFacadeMap myMissileSimObjectFacadeMap
Definition: launcherController.h:283
virtual bool isFireMissileLauncherTasked() const
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.
DtLauncherController is a controller that accepts input from a target sensor, and provides ammunition...
Definition: launcherController.h:63
virtual void fire() override
updates weapon interface
DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem &, const DtVector &from, const DtVector &to)
Returns the distance from the two points. Coordinates are in local database coordinates The coordinat...
Instances of DtVectorOutputPort are output ports through which data producers can send a DtVector...
Definition: vectorIOPort.h:52
File: simMsg.h.
Definition: simMessage.h:35
MissileInfo(const MissileInfo &orig)
Definition: launcherController.h:241
MissileInfo()
Definition: launcherController.h:239
Definition: launcherController.h:237
std::vector< DtUUID > myRemovedMissiles
Definition: launcherController.h:286
std::map< DtUUID, DtMissileSimObjectFacade * > MissileSimObjectFacadeMap
Definition: launcherController.h:282
DtSimObjectReference simObjectReference
Definition: launcherController.h:246
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
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:88
double myAbandonPassedMissileDistance
If the missile passes its target within this distance, it will be abandoned and disconnected from the...
Definition: launcherController.h:278
DtSimTask is an abstract base class from which real tasks can derive. It manages the read/write capab...
Definition: simTask.h:30
virtual bool init() override
Overridden to initialize values obtained from the descriptor.
virtual void registerAttributeFunctions()
Called to register functions that provide system attribute values. Called by init(). Empty in this class. Overridden in different components to add attribute provider functions.
Definition: simComponent.h:133
virtual AcceptLevel acceptTask(const DtTaskMessage &task)
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.
virtual const DtFireMissileLauncherTask * getFireMissileLauncherTask() const
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.
virtual const char * type() const override
Returns a string identifies the class type of component. Type values are defined in compTypes...
virtual void tick() override
If the myWaitingForFire flag is set and the munition loader is still loaded, the weapon has not fired...
virtual void preFirstTickInit() override
Starts with weapon loaded, if the weapon has a full complement of ammunition.
DtStringOutputPort * myMissileIdPort
Output Port Name: missile-id Output Port Description: Object id of the missile. Output Port Range: O...
Definition: launcherController.h:257
A DtTaskMsg is a DtRadioMsg with a pointer to a task. The type of the taskMsg is just the type of the...
Definition: taskMessage.h:21
boost::signals2::scoped_connection myMissileRemovedFromActiveListConnection
Definition: launcherController.h:288
MissileInfo(const DtUUID &u, DtSimObjectReference r)
Definition: launcherController.h:240
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