VR-Forces 4.0.4 Class Documentation
include/vrfmodel/laserGuidedLauncherController.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2008 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: laserGuidedLauncherController.h,v $ $Revision: 1.4 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00013 
00014 #ifndef laserGuidedLauncherController_h
00015 #define laserGuidedLauncherController_h
00016 
00017 #include "vrfmodel/vrfmodelDefines.h"
00018 #include "vrfobjcore/cntrlCmpnt.h"
00019 
00020 class DtLaserGuidedLauncherControllerDescriptor;
00021 class DtLaserLauncherPSR;
00022 class DtReflectedDesignator;
00023 class DtVectorOutputPort;
00024 class DtSimMessage;
00025 
00033 class DT_DLL_vrfmodel DtLaserGuidedLauncherController : public DtControllerComponent
00034 {
00035 private:
00037    DtLaserGuidedLauncherController();
00039    DtLaserGuidedLauncherController(const DtLaserGuidedLauncherController& orig);
00041    DtLaserGuidedLauncherController& operator=(const DtLaserGuidedLauncherController& orig);
00042 
00043 public:
00044 
00047    DtLaserGuidedLauncherController(const DtString &name, DtVrfObject* owner,
00048       DtSimManager* simManager, DtComponentDescriptor* compDesc = 0,
00049       DtReaderWriterRegistry* parentRegistry = 0);
00050 
00052    virtual ~DtLaserGuidedLauncherController();
00053 
00056    virtual DtString type() const;
00057 
00060    virtual bool init();
00061 
00063    virtual void setComponentDescriptor(DtComponentDescriptor *compDesc);
00064 
00070    virtual bool createPSR();
00071 
00073    virtual void tick();
00074 
00078    static DtSimComponent * creator(const DtString& name, 
00079       DtVrfObject* owner,
00080       DtSimManager* simManager, 
00081       DtComponentDescriptor* desc = 0,
00082       DtReaderWriterRegistry* parentRegistry = 0);
00083 
00084 protected:
00085 
00087    virtual void addRangeItems();
00088 
00089    virtual bool createPorts();
00090 
00093    virtual bool missileResourceAvailable() const;
00094 
00096    virtual void consumeMissileResource();
00097 
00099    virtual bool fireMunition(DtReflectedDesignator* target);
00100 
00104    virtual DtVrfObject* createMissileObject();
00105 
00108    virtual void createAndSendFireInteraction(DtVrfObject* missile,
00109       DtReflectedDesignator* targetDesignator,
00110       const DtEventId& eventId);
00111 
00119    virtual DtReflectedDesignator* chooseTarget(bool& targetInFireCone, DtVector& targetLocalPosition);
00120 
00127    virtual bool targetDesginatorValid(DtReflectedDesignator* target,
00128       DtVector& targetLocalPosition);
00129 
00131    virtual bool targetDesginatorInFireCone(DtReflectedDesignator* target);
00132 
00135    virtual bool munitionLoaded() const;
00136 
00139    virtual DtVector launcherGeocentricPosition() const;
00140 
00142    virtual bool missileInFlight();
00143 
00145    virtual int defaultLaserCode() const;
00146 
00148 
00149    static void setLaserCodeRequestCallback(DtSimMessage* msg, void* usrData);
00150    virtual void processSetLaserCodeRequestMessage(DtSimMessage* msg);
00152 
00155 
00156    static void setSyncLaserCodeCallback(DtSimMessage* msg, void* usr);
00157    virtual void processSetSyncLaserCode(DtSimMessage* msg);
00159 
00160 protected:
00162    const DtLaserGuidedLauncherControllerDescriptor* myDescriptor;
00163 
00166    DtLaserLauncherPSR* myProcessState;
00167 
00169 
00170 
00171 
00172 
00173 
00174 
00175 
00176    DtVectorOutputPort* myTargetLocationOutputPort;
00178 
00179    bool myFirstTick;
00180 
00181 };
00182 
00183 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)