|
WSF
|
#include <Tool.hpp>


Public Member Functions | |
| Tool (const Tool &aSrc) | |
| Tool & | operator= (const Tool &)=delete |
| ~Tool () override | |
| Tool * | Clone () const override=0 |
| virtual void | Update (double aSimTime) |
| virtual bool | Initialize (WsfSimulation &aSimulation) |
| bool | ProcessInput (UtInput &aInput) override |
| virtual void | MoverBurnout (double aSimTime, WsfMover *aMoverPtr) |
| name Callbacks from WeaponObserver (lets the tool have access to simulation callbacks) | |
| virtual void | GuidanceComputerPhaseChanged (double aSimTime, WsfGuidanceComputer *aComputerPtr) |
| Optional tool method called by WeaponObserver to pass on the GuidanceComputerPhaseChanged simulation observer event. | |
| virtual void | PlatformAdded (double aSimTime, WsfPlatform *aPlatformPtr) |
| Optional tool method called by WeaponObserver to pass on the PlatformAdded simulation observer event. | |
| WsfStringId | WeaponPlatformTypeId () const |
| double | FrameStep () const |
| bool | IsInitialized () const |
| WsfPlatform * | GetLauncherPlatform () const |
| WsfExplicitWeapon * | GetLauncherWeapon () const |
| Public Member Functions inherited from WsfObject | |
| WsfObject () | |
| This is the constructor for the WsfObject class. | |
| ~WsfObject () override | |
| This is the destructor for the WsfObject class. | |
| const char * | GetScriptClassName () const override |
| const std::string & | GetType () const |
| WsfStringId | GetTypeId () const |
| Get the string ID of the 'type' of the object. | |
| void | SetType (WsfStringId aType) |
| const std::string & | GetBaseType () const |
| WsfStringId | GetBaseTypeId () const |
| const TypeList & | GetTypeList () const |
| bool | IsA_TypeOf (WsfStringId aType) const |
| WsfObject & | operator= (const WsfObject &aRhs) |
| Assignment operator. | |
| template<typename T> | |
| void | Serialize (T &aBuff) |
| For XIO (de)serialization. | |
| const std::string & | GetName () const |
| WsfStringId | GetNameId () const |
| void | SetName (WsfStringId aName) |
Protected Member Functions | |
| WsfSimulation * | GetSimulation () const |
| WsfScenario & | GetScenario () const |
| ToolManager * | GetManager () const |
| Tool (WsfScenario &aScenario) | |
| This constructor initializes the object. | |
| void | UnInitialize () |
| bool | IsDone () const |
| Return a flag to indicate that this Tool has completed its work. | |
| bool | DebugEnabled () const |
| Return a flag to indicate that debugging is enabled. | |
| virtual void | ResolveNames () |
| Method called to determine what the output objects and file names are called. | |
| virtual bool | FireNewWeapon (double aSimTime)=0 |
| virtual void | ErrorBailout () |
| WsfObject (const WsfObject &aSrc) | |
| Copy constructor (for Clone()). | |
Protected Attributes | |
| WsfScenario * | mScenarioPtr |
| WsfSimulation * | mSimulationPtr |
| WeaponObserver | mObserver |
| WsfPlatform * | mLaunchPlatPtr |
| WsfExplicitWeapon * | mLaunchWpnPtr |
| double | mFrameStep |
| double | mLastUpdate |
| double | mLatDeg |
| double | mLonDeg |
| double | mAlt |
| double | mHeadingRad |
| bool | mDone |
| bool | mNotifiedDone |
| bool | mInitialized |
| bool | mDebug |
| bool | mTerminateOnLaunchFailure |
| std::string | mToolProduces |
| std::string | mFileExtension |
| WsfStringId | mWeaponEffectTypeId |
| WsfStringId | mLaunchPlatformTypeId |
| WsfStringId | mTargetPlatformTypeId |
| WsfStringId | mWeaponNameId |
| std::string | mOutputFileName |
| std::string | mOutputObjectName |
Additional Inherited Members | |
| Public Types inherited from WsfObject | |
| typedef std::vector< WsfStringId > | TypeList |
| The list of types returned by GetTypeList. | |
Tool is a base class for a processor that does some utility function and reports when it is done. Tool is a processor (similar to WsfProcessor, but distinct from it, since it does not reside on a WsfPlatform) that does some utility function. The look and feel of this utility is modeled upon the WSF core framework. The intent is that a single "main" function will instantiate and control one or more Tools, and carry out a WsfSimulation, advancing time until each of the instantiated Tools have reported that they are done. The earliest use of this class is in repeatedly firing explicit weapons of interest, under completely controlled engagement conditions, to gather metrics that quantify the weapon's performance and behavior (defining lethality tables, Launch Acceptable Regions (LARs), times of flight, etc.). The input stream (see ProcessInput()) will specify where the Tool activity takes place (in latitude, longitude), the explicit weapon type to experiment upon, and other necessary information.
| Tool::Tool | ( | const Tool & | aSrc | ) |
References mAlt, mDebug, mDone, mFileExtension, mFrameStep, mHeadingRad, mInitialized, mLastUpdate, mLatDeg, mLaunchPlatformTypeId, mLaunchPlatPtr, mLaunchWpnPtr, mLonDeg, mNotifiedDone, mObserver, mOutputFileName, mOutputObjectName, mScenarioPtr, mSimulationPtr, mTargetPlatformTypeId, mTerminateOnLaunchFailure, mToolProduces, mWeaponEffectTypeId, mWeaponNameId, Tool(), and WsfObject::WsfObject().
Referenced by AirToAirLaunchComputerGenerator::AirToAirLaunchComputerGenerator(), ATA_LaunchComputerGenerator::ATA_LaunchComputerGenerator(), ATA_LaunchComputerGenerator::ATA_LaunchComputerGenerator(), ATG_LAR_And_LC_Generator::ATG_LAR_And_LC_Generator(), ATG_LAR_And_LC_Generator::ATG_LAR_And_LC_Generator(), BallisticLaunchComputerGenerator::BallisticLaunchComputerGenerator(), BallisticLaunchComputerGenerator::BallisticLaunchComputerGenerator(), BallisticMissileLaunchComputerGenerator::BallisticMissileLaunchComputerGenerator(), BallisticMissileLaunchComputerGenerator::BallisticMissileLaunchComputerGenerator(), AirToAirLaunchComputerGenerator::Clone(), ATA_LaunchComputerGenerator::Clone(), ATG_LAR_And_LC_Generator::Clone(), BallisticLaunchComputerGenerator::Clone(), BallisticMissileLaunchComputerGenerator::Clone(), OrbitalLaunchComputerGenerator::Clone(), SAM_LaunchComputerGenerator::Clone(), Clone(), ATA_LaunchComputerGenerator::operator=(), BallisticLaunchComputerGenerator::operator=(), BallisticMissileLaunchComputerGenerator::operator=(), operator=(), OrbitalLaunchComputerGenerator::OrbitalLaunchComputerGenerator(), OrbitalLaunchComputerGenerator::OrbitalLaunchComputerGenerator(), SAM_LaunchComputerGenerator::SAM_LaunchComputerGenerator(), Tool(), ATG_LAR_And_LC_Generator::~ATG_LAR_And_LC_Generator(), and OrbitalLaunchComputerGenerator::~OrbitalLaunchComputerGenerator().
|
override |
|
protected |
This constructor initializes the object.
References mAlt, mDebug, mDone, mFileExtension, mFrameStep, mHeadingRad, mInitialized, mLastUpdate, mLatDeg, mLaunchPlatformTypeId, mLaunchPlatPtr, mLaunchWpnPtr, mLonDeg, mNotifiedDone, mObserver, mOutputFileName, mOutputObjectName, mScenarioPtr, mSimulationPtr, mTargetPlatformTypeId, mTerminateOnLaunchFailure, mToolProduces, mWeaponEffectTypeId, mWeaponNameId, and WsfObject::WsfObject().
|
overridepure virtual |
Return a copy of this object. Must be implemented by all derived types. If cloning is impossible, a WsfUncloneableException should be thrown.
Implements WsfObject.
Implemented in AirToAirLaunchComputerGenerator, ATA_LaunchComputerGenerator, ATG_LAR_And_LC_Generator, BallisticLaunchComputerGenerator, BallisticMissileLaunchComputerGenerator, OrbitalLaunchComputerGenerator, and SAM_LaunchComputerGenerator.
References GuidanceComputerPhaseChanged(), Initialize(), MoverBurnout(), PlatformAdded(), Tool(), and WeaponPlatformTypeId().
Referenced by ToolManager::ProcessInput().
|
inlineprotected |
Return a flag to indicate that debugging is enabled.
References mDebug.
Referenced by AirToAirLaunchComputerGenerator::FireNewWeapon(), SAM_LaunchComputerGenerator::FireNewWeapon(), AirToAirLaunchComputerGenerator::Initialize(), ATA_LaunchComputerGenerator::Initialize(), ATG_LAR_And_LC_Generator::LARGenUpdate(), BallisticLaunchComputerGenerator::LARGenUpdate(), SAM_LaunchComputerGenerator::LCGenUpdate(), SAM_LaunchComputerGenerator::PlaceNewTarget(), ATA_LaunchComputerGenerator::Update(), BallisticMissileLaunchComputerGenerator::Update(), and OrbitalLaunchComputerGenerator::Update().
|
inlineprotectedvirtual |
|
protectedpure virtual |
Method called to fire a new weapon. Pure virtual base method must be implemented in derived classes.
| aSimTime | The current simulated time. |
Implemented in AirToAirLaunchComputerGenerator, ATG_LAR_And_LC_Generator, BallisticLaunchComputerGenerator, and SAM_LaunchComputerGenerator.
|
inline |
References mFrameStep.
|
inline |
References mLaunchPlatPtr.
|
inline |
References mLaunchWpnPtr.
|
protected |
References ToolManager::Find(), and GetScenario().
Referenced by UnInitialize(), and Update().
|
inlineprotected |
References mScenarioPtr.
Referenced by GetManager(), Initialize(), ATG_LAR_And_LC_Generator::LARGenUpdate(), SAM_LaunchComputerGenerator::PlaceNewTarget(), ATA_LaunchComputerGenerator::ProcessInput(), ATA_LaunchComputerGenerator::ResolveNames(), SAM_LaunchComputerGenerator::TestOutputFile(), ATA_LaunchComputerGenerator::WriteOutputFile(), ATG_LAR_And_LC_Generator::WriteOutputFile(), and BallisticLaunchComputerGenerator::WriteOutputFile().
|
inlineprotected |
|
virtual |
Optional tool method called by WeaponObserver to pass on the GuidanceComputerPhaseChanged simulation observer event.
Reimplemented in OrbitalLaunchComputerGenerator.
Referenced by Clone().
|
virtual |
In another typical WSF construct, this method initializes the object prior to run time. If the Initialization fails, the object will not be permitted to transition to the run mode. Derived classes must assure that they are initialized internally, as well as calling the base class Initialize method.
Reimplemented in AirToAirLaunchComputerGenerator, ATA_LaunchComputerGenerator, ATG_LAR_And_LC_Generator, BallisticLaunchComputerGenerator, BallisticMissileLaunchComputerGenerator, OrbitalLaunchComputerGenerator, and SAM_LaunchComputerGenerator.
References WsfSimulation::AddEvent(), WsfSimulation::AddPlatform(), WsfComponentList::RoleIterator< T >::AtEnd(), WsfObjectTypeList< T >::Clone(), WsfPlatformTypes::Get(), WsfWeaponEffectsTypes::Get(), WsfObject::GetNameId(), WsfSimulation::GetPlatformByName(), GetScenario(), WsfSimulation::GetSimTime(), mAlt, mHeadingRad, mInitialized, mLastUpdate, mLatDeg, mLaunchPlatformTypeId, mLaunchPlatPtr, mLaunchWpnPtr, mLonDeg, mObserver, mSimulationPtr, mWeaponEffectTypeId, mWeaponNameId, ResolveNames(), WsfLaunchComputer::SetComputerGenerationMode(), success, and UnInitialize().
Referenced by Clone(), AirToAirLaunchComputerGenerator::Initialize(), ATA_LaunchComputerGenerator::Initialize(), ATG_LAR_And_LC_Generator::Initialize(), BallisticLaunchComputerGenerator::Initialize(), BallisticMissileLaunchComputerGenerator::Initialize(), OrbitalLaunchComputerGenerator::Initialize(), and SAM_LaunchComputerGenerator::Initialize().
|
inlineprotected |
|
inline |
References mInitialized.
|
virtual |
name Callbacks from WeaponObserver (lets the tool have access to simulation callbacks)
Optional tool method called by WeaponObserver to pass on the MoverBurnout simulation observer event.
Reimplemented in OrbitalLaunchComputerGenerator.
Referenced by Clone().
|
virtual |
Optional tool method called by WeaponObserver to pass on the PlatformAdded simulation observer event.
Reimplemented in BallisticLaunchComputerGenerator, and OrbitalLaunchComputerGenerator.
Referenced by Clone().
|
overridevirtual |
In a typical WSF construct, this method parses the input stream, in order to extract commands and values fed to it. See the Weapon Tools User's Guide for details.
Reimplemented from WsfObject.
References mAlt, mDebug, mFileExtension, mFrameStep, mHeadingRad, mLatDeg, mLaunchPlatformTypeId, mLonDeg, mOutputFileName, mOutputObjectName, mTargetPlatformTypeId, mTerminateOnLaunchFailure, mToolProduces, mWeaponEffectTypeId, and mWeaponNameId.
Referenced by AirToAirLaunchComputerGenerator::ProcessInput(), ATA_LaunchComputerGenerator::ProcessInput(), ATG_LAR_And_LC_Generator::ProcessInput(), BallisticLaunchComputerGenerator::ProcessInput(), BallisticMissileLaunchComputerGenerator::ProcessInput(), OrbitalLaunchComputerGenerator::ProcessInput(), SAM_LaunchComputerGenerator::ProcessInput(), and ToolManager::ProcessInput().
|
protectedvirtual |
Method called to determine what the output objects and file names are called.
Virtual method to resolve the output object name and output file names.
Reimplemented in ATA_LaunchComputerGenerator.
References mFileExtension, mOutputFileName, mOutputObjectName, mToolProduces, and WeaponPlatformTypeId().
Referenced by Initialize().
|
protected |
If Initialize() fails, this method will de-register the Tool from active consideration within the main execution loop, allowing the simulation to complete when all other Tools (if any) are done.
References GetManager(), and ToolManager::UnRegister().
Referenced by AirToAirLaunchComputerGenerator::Initialize(), ATA_LaunchComputerGenerator::Initialize(), ATG_LAR_And_LC_Generator::Initialize(), BallisticLaunchComputerGenerator::Initialize(), SAM_LaunchComputerGenerator::Initialize(), and Initialize().
|
virtual |
Advance the Tool forward in time. This base method shall be overridden in derived classes, and at the end of the derived method, this parent method must be called, to properly maintain the internal state.
Reimplemented in AirToAirLaunchComputerGenerator, ATA_LaunchComputerGenerator, ATG_LAR_And_LC_Generator, BallisticLaunchComputerGenerator, BallisticMissileLaunchComputerGenerator, OrbitalLaunchComputerGenerator, and SAM_LaunchComputerGenerator.
References GetManager(), mDone, mLastUpdate, mNotifiedDone, and ToolManager::UnRegister().
Referenced by AirToAirLaunchComputerGenerator::Update(), ATA_LaunchComputerGenerator::Update(), ATG_LAR_And_LC_Generator::Update(), BallisticLaunchComputerGenerator::Update(), BallisticMissileLaunchComputerGenerator::Update(), OrbitalLaunchComputerGenerator::Update(), and SAM_LaunchComputerGenerator::Update().
| WsfStringId Tool::WeaponPlatformTypeId | ( | ) | const |
References mLaunchWpnPtr.
Referenced by Clone(), SAM_LaunchComputerGenerator::FireNewWeapon(), ATA_LaunchComputerGenerator::ResolveNames(), and ResolveNames().
|
protected |
Referenced by ATA_LaunchComputerGenerator::ATA_LaunchComputerGenerator(), ATG_LAR_And_LC_Generator::ATG_LAR_And_LC_Generator(), AirToAirLaunchComputerGenerator::FireNewWeapon(), Initialize(), ATA_LaunchComputerGenerator::ProcessInput(), ProcessInput(), ATA_LaunchComputerGenerator::ResolveNames(), Tool(), Tool(), and ATA_LaunchComputerGenerator::WriteOutputFile().
|
protected |
Referenced by DebugEnabled(), ProcessInput(), Tool(), and Tool().
|
protected |
Referenced by ATG_LAR_And_LC_Generator::ErrorBailout(), BallisticLaunchComputerGenerator::ErrorBailout(), SAM_LaunchComputerGenerator::ErrorBailout(), AirToAirLaunchComputerGenerator::Finish(), IsDone(), BallisticLaunchComputerGenerator::LARGenUpdate(), SAM_LaunchComputerGenerator::LCGenUpdate(), Tool(), Tool(), BallisticMissileLaunchComputerGenerator::Update(), OrbitalLaunchComputerGenerator::Update(), and Update().
|
protected |
Referenced by ProcessInput(), ATA_LaunchComputerGenerator::ResolveNames(), ResolveNames(), Tool(), and Tool().
|
protected |
Referenced by FrameStep(), ProcessInput(), Tool(), and Tool().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by AirToAirLaunchComputerGenerator::FireNewWeapon(), ATG_LAR_And_LC_Generator::FireNewWeapon(), BallisticLaunchComputerGenerator::FireNewWeapon(), SAM_LaunchComputerGenerator::FireNewWeapon(), Initialize(), BallisticLaunchComputerGenerator::LARGenUpdate(), ProcessInput(), Tool(), and Tool().
|
protected |
Referenced by Initialize(), OrbitalLaunchComputerGenerator::PlatformAdded(), ProcessInput(), Tool(), and Tool().
|
protected |
Referenced by AirToAirLaunchComputerGenerator::FireNewWeapon(), ATG_LAR_And_LC_Generator::FireNewWeapon(), BallisticLaunchComputerGenerator::FireNewWeapon(), SAM_LaunchComputerGenerator::FireNewWeapon(), GetLauncherPlatform(), SAM_LaunchComputerGenerator::Initialize(), Initialize(), BallisticLaunchComputerGenerator::LARGenUpdate(), SAM_LaunchComputerGenerator::PlaceNewTarget(), BallisticLaunchComputerGenerator::PlatformAdded(), SAM_LaunchComputerGenerator::TestPoints(), Tool(), and Tool().
|
protected |
Referenced by AirToAirLaunchComputerGenerator::FireNewWeapon(), ATG_LAR_And_LC_Generator::FireNewWeapon(), BallisticLaunchComputerGenerator::FireNewWeapon(), SAM_LaunchComputerGenerator::FireNewWeapon(), GetLauncherWeapon(), AirToAirLaunchComputerGenerator::Initialize(), BallisticMissileLaunchComputerGenerator::Initialize(), OrbitalLaunchComputerGenerator::Initialize(), Initialize(), Tool(), Tool(), OrbitalLaunchComputerGenerator::Update(), WeaponPlatformTypeId(), and ATA_LaunchComputerGenerator::WriteOutputFile().
|
protected |
Referenced by AirToAirLaunchComputerGenerator::FireNewWeapon(), ATG_LAR_And_LC_Generator::FireNewWeapon(), BallisticLaunchComputerGenerator::FireNewWeapon(), SAM_LaunchComputerGenerator::FireNewWeapon(), Initialize(), BallisticLaunchComputerGenerator::LARGenUpdate(), ProcessInput(), Tool(), and Tool().
|
protected |
Referenced by ATG_LAR_And_LC_Generator::ErrorBailout(), BallisticLaunchComputerGenerator::ErrorBailout(), SAM_LaunchComputerGenerator::ErrorBailout(), AirToAirLaunchComputerGenerator::Finish(), AirToAirLaunchComputerGenerator::FireNewWeapon(), ATG_LAR_And_LC_Generator::FireNewWeapon(), SAM_LaunchComputerGenerator::FireNewWeapon(), OrbitalLaunchComputerGenerator::GuidanceComputerPhaseChanged(), AirToAirLaunchComputerGenerator::Initialize(), BallisticMissileLaunchComputerGenerator::Initialize(), OrbitalLaunchComputerGenerator::Initialize(), SAM_LaunchComputerGenerator::Initialize(), Initialize(), ATG_LAR_And_LC_Generator::LARGenUpdate(), BallisticLaunchComputerGenerator::LARGenUpdate(), SAM_LaunchComputerGenerator::LCGenUpdate(), OrbitalLaunchComputerGenerator::MoverBurnout(), OrbitalLaunchComputerGenerator::PlatformAdded(), ATG_LAR_And_LC_Generator::SensitivityUpdate(), Tool(), Tool(), AirToAirLaunchComputerGenerator::Update(), ATA_LaunchComputerGenerator::Update(), BallisticMissileLaunchComputerGenerator::Update(), and OrbitalLaunchComputerGenerator::Update().
|
protected |
Referenced by AirToAirLaunchComputerGenerator::Initialize(), ATA_LaunchComputerGenerator::Initialize(), ATG_LAR_And_LC_Generator::Initialize(), OrbitalLaunchComputerGenerator::OrbitalLaunchComputerGenerator(), OrbitalLaunchComputerGenerator::ProcessInput(), ProcessInput(), ATA_LaunchComputerGenerator::ResolveNames(), ResolveNames(), SAM_LaunchComputerGenerator::TestOutputFile(), Tool(), Tool(), ATA_LaunchComputerGenerator::WriteOutputFile(), BallisticLaunchComputerGenerator::WriteOutputFile(), and SAM_LaunchComputerGenerator::WriteOutputFile().
|
protected |
Referenced by ProcessInput(), ATA_LaunchComputerGenerator::ResolveNames(), ResolveNames(), Tool(), Tool(), ATA_LaunchComputerGenerator::WriteOutputFile(), ATG_LAR_And_LC_Generator::WriteOutputFile(), BallisticLaunchComputerGenerator::WriteOutputFile(), and SAM_LaunchComputerGenerator::WriteOutputFile().
|
protected |
Referenced by GetScenario(), Tool(), and Tool().
|
protected |
Referenced by GetSimulation(), Initialize(), Tool(), and Tool().
|
protected |
|
protected |
|
protected |
Referenced by AirToAirLaunchComputerGenerator::AirToAirLaunchComputerGenerator(), ATA_LaunchComputerGenerator::ATA_LaunchComputerGenerator(), ATG_LAR_And_LC_Generator::ATG_LAR_And_LC_Generator(), BallisticLaunchComputerGenerator::BallisticLaunchComputerGenerator(), BallisticMissileLaunchComputerGenerator::BallisticMissileLaunchComputerGenerator(), OrbitalLaunchComputerGenerator::OrbitalLaunchComputerGenerator(), ProcessInput(), ATA_LaunchComputerGenerator::ResolveNames(), ResolveNames(), SAM_LaunchComputerGenerator::SAM_LaunchComputerGenerator(), Tool(), and Tool().
|
protected |
Referenced by BallisticMissileLaunchComputerGenerator::BallisticMissileLaunchComputerGenerator(), BallisticMissileLaunchComputerGenerator::BallisticMissileLaunchComputerGenerator(), ATG_LAR_And_LC_Generator::Initialize(), Initialize(), OrbitalLaunchComputerGenerator::OrbitalLaunchComputerGenerator(), OrbitalLaunchComputerGenerator::OrbitalLaunchComputerGenerator(), ProcessInput(), Tool(), and Tool().
|
protected |
Referenced by Initialize(), ProcessInput(), Tool(), and Tool().