|
WSF
|
#include <WsfXIO_WeaponComponent.hpp>


Public Types | |
| enum | { cWEAPON_INFO = WsfXIO_RequestPlatformInfoPkt::cPART_1_INFO , cABORT_FIRE = WsfXIO_TaskCommandPkt::cTASK_COMMAND_1 } |
| Equate generic definitions in the packet registry to more meaningful definitions;. More... | |
| Public Types inherited from WsfComponentT< PARENT_TYPE > | |
| typedef PARENT_TYPE | ParentType |
| This is needed to support the WsfComponentList template. | |
Public Member Functions | |
| WsfXIO_WeaponComponent () | |
| ~WsfXIO_WeaponComponent () override=default | |
| Public Member Functions inherited from WsfXIO_Component | |
| WsfXIO_Component (int aRole, const std::string &aName) | |
| bool | Initialize () |
| Called by WsfXIO_Interface to allow initialization of the component. | |
| Public Member Functions inherited from WsfSimpleComponentT< WsfComponentT< PARENT_TYPE > > | |
| WsfSimpleComponentT ()=default | |
| Empty constructor for serialization. | |
| WsfSimpleComponentT (int aRole, WsfStringId aName) | |
| WsfSimpleComponentT (int aRole) | |
| WsfSimpleComponentT (WsfStringId aName) | |
| WsfSimpleComponentT (const WsfSimpleComponentT &aSrc) | |
| WsfSimpleComponentT & | operator= (const WsfSimpleComponentT &aRhs) |
| ~WsfSimpleComponentT () override=default | |
| WsfStringId | GetComponentName () const override |
| const int * | GetComponentRoles () const override |
| Public Member Functions inherited from WsfComponentT< PARENT_TYPE > | |
| WsfComponentT () | |
| WsfComponentT (const WsfComponentT &) noexcept | |
| WsfComponentT & | operator= (const WsfComponentT &) noexcept |
| ~WsfComponentT () override=default | |
| virtual void | ComponentParentChanged (ParentType *aParentPtr) |
| ParentType * | GetComponentParent () const |
| void | SetComponentParent (ParentType *aParentPtr) |
| Public Member Functions inherited from WsfComponent | |
| virtual | ~WsfComponent ()=default |
| virtual int | GetComponentInitializationOrder () const |
| template<typename T> | |
| bool | QueryInterfaceT (T *&aRolePtr) |
| bool | ComponentHasRole (int aRole) |
| Returns true if the component has the specified role. | |
| virtual bool | PreInitialize (double aSimTime) |
| virtual bool | Initialize (double aSimTime) |
| virtual bool | Initialize2 (double aSimTime) |
| virtual void | PreInput () |
| virtual bool | ProcessInput (UtInput &aInput) |
| Public Member Functions inherited from WsfNamed | |
| WsfNamed () | |
| WsfNamed (WsfStringId aName) | |
| WsfNamed (const WsfNamed &)=default | |
| WsfNamed & | operator= (const WsfNamed &)=default |
| virtual | ~WsfNamed ()=default |
| const std::string & | GetName () const |
| WsfStringId | GetNameId () const |
| void | SetName (WsfStringId aName) |
Component interface. | |
| WsfComponent * | CloneComponent () const override |
| void * | QueryInterface (int aRole) override |
| void | ComponentParentChanged (WsfXIO_Simulation *aXIO_SimulationPtr) override |
| Called when the component is added to the XIO interface. | |
Miscellaneous methods. | |
| WsfXIO_Simulation * | GetXIO_Simulation () const |
| WsfSimulation & | GetSimulation () const |
| double | GetSimTime () const |
WsfXIO_Component interface. | |
| void | EM_RcvrInfo_Load (WsfXIO_EM_RcvrInfo &aInfo, const WsfEM_Rcvr &aRcvr) override |
| void | EM_XmtrInfo_Load (WsfXIO_EM_XmtrInfo &aInfo, const WsfEM_Xmtr &aXmtr) override |
| WsfXIO_PlatformPartInfo * | CreatePlatformPartInfo (WsfPlatformPart &aPart) override |
| Called from WsfXIO_PlatformPartInfo::Create to process an unrecognized platform part type. | |
| void | RegisterSimulationObservers (WsfSimulation &aSimulation, UtCallbackHolder &aCallbacks) override |
| Called from WsfXIO_PlatformInfoService::UpdateCallbacks. | |
| bool | FillPartState (const WsfPlatformPart &aPart, WsfXIO_PartStateChangePkt &aPkt) override |
| Called from WsfXIO_PlatformInfoService::FillPartState. | |
| WsfObject * | FindPartType (int aPartType, WsfStringId aPartTypeName) override |
| Called from WsfXIO_PlatformInfoService::FindObjectType. | |
| WsfObject * | FindPart (const WsfPlatform &aPlatform, int aPartType, WsfStringId aPartName) override |
| Called from WsfXIO_PlatformInfoService::FindObjectType. | |
| bool | HandleStateChangeRequest (double aSimTime, WsfXIO_PartStateChangeRequestPkt &aPkt, WsfPlatform *aPlatformPtr, WsfEM_Xmtr *&aXmtrPtr, WsfEM_Rcvr *&aRcvrPtr) override |
| bool | HandleTaskCommand (double aSimTime, WsfXIO_TaskCommandPkt &aPkt, WsfTaskProcessor *aProcA_Ptr, WsfTaskProcessor *aProcB_Ptr, WsfTrack *aTrackPtr, WsfTaskResource *aResourcePtr) override |
Additional Inherited Members | |
| int | mRoles [2] |
| anonymous enum |
| WsfXIO_WeaponComponent::WsfXIO_WeaponComponent | ( | ) |
References cWSF_COMPONENT_WEAPON_XIO_COMPONENT, and WsfXIO_Component::WsfXIO_Component().
Referenced by CloneComponent().
|
overridedefault |
|
inlineoverridevirtual |
Clones a component. May return null if component does not support clone.
Implements WsfComponent.
References WsfXIO_WeaponComponent().
|
override |
Called when the component is added to the XIO interface.
References WsfXIO_Simulation::GetInterface(), WsfXIO_Simulation::GetPlatformInfoService(), and WsfXIO_WeaponPacketRegistry::RegisterPackets().
|
overridevirtual |
Called from WsfXIO_PlatformPartInfo::Create to process an unrecognized platform part type.
Reimplemented from WsfXIO_Component.
References GetXIO_Simulation(), and WsfComponent::QueryInterfaceT().
|
overridevirtual |
Reimplemented from WsfXIO_Component.
References WsfEW_EP::GetElectronicProtect().
|
overridevirtual |
Reimplemented from WsfXIO_Component.
References WsfEW_EA::GetElectronicAttack().
|
overridevirtual |
Called from WsfXIO_PlatformInfoService::FillPartState.
Reimplemented from WsfXIO_Component.
References WsfWeapon::GetCurrentModeName(), WsfWeapon::GetModeCount(), WsfWeapon::GetModeEntry(), WsfNamed::GetNameId(), WsfWeapon::GetQuantityRemaining(), WsfMode::IsSelected(), WsfXIO_PartStateChangePkt::mCurrentModeName, WsfXIO_PartStateChangePkt::mPartType, WsfXIO_PartStateChangePkt::mQuantityRemaining, and WsfXIO_PartStateChangePkt::mSelectedModes.
|
overridevirtual |
Called from WsfXIO_PlatformInfoService::FindObjectType.
Reimplemented from WsfXIO_Component.
References WsfComponentList::GetComponent().
|
overridevirtual |
Called from WsfXIO_PlatformInfoService::FindObjectType.
Reimplemented from WsfXIO_Component.
References WsfObjectTypeList< T >::Find(), WsfWeaponTypes::Get(), and GetSimulation().
| double WsfXIO_WeaponComponent::GetSimTime | ( | ) | const |
References WsfSimulation::GetSimTime(), and GetSimulation().
| WsfSimulation & WsfXIO_WeaponComponent::GetSimulation | ( | ) | const |
References WsfXIO_Simulation::GetSimulation(), and GetXIO_Simulation().
Referenced by FindPartType(), GetSimTime(), and HandleStateChangeRequest().
|
inline |
References WsfComponentT< PARENT_TYPE >::GetComponentParent().
Referenced by CreatePlatformPartInfo(), and GetSimulation().
|
overridevirtual |
Reimplemented from WsfXIO_Component.
References WsfXIO_PartStateChangeRequestPkt::cCHANGE_RCVR, WsfXIO_PartStateChangeRequestPkt::cCOMMAND_MASK, WsfXIO_PartStateChangeRequestPkt::cDESELECT_MODE, WsfXIO_PartStateChangeRequestPkt::cXMTR_RCVR_COMMAND, WsfWeapon::DeselectMode(), WsfComponentList::GetComponent(), WsfWeapon::GetEM_Xmtr(), WsfWeapon::GetEM_XmtrCount(), WsfEM_Xmtr::GetLinkedReceiver(), WsfSimulation::GetSimTime(), GetSimulation(), WsfXIO_PartStateChangeRequestPkt::mPartName, WsfXIO_PartStateChangeRequestPkt::mPartType, WsfXIO_PartStateChangeRequestPkt::mSelectMode, WsfXIO_PartStateChangeRequestPkt::mStateChange, WsfXIO_PartStateChangeRequestPkt::mXmtrIndex, WsfWeapon::SelectMode(), and simTime.
|
overridevirtual |
Reimplemented from WsfXIO_Component.
References WsfWeaponTaskManager::AbortFiring(), cABORT_FIRE, WsfWeaponTaskManager::Find(), WsfTrack::GetTrackId(), and WsfXIO_TaskCommandPkt::mCommandType.
|
inlineoverridevirtual |
Requests a component's role interface. A component can support one or more roles.
| aRole | The role whose interface is to be returned. |
Implements WsfComponent.
References WsfSimpleComponentT< WsfComponentT< PARENT_TYPE > >::mRoles.
|
overridevirtual |
Called from WsfXIO_PlatformInfoService::UpdateCallbacks.
Reimplemented from WsfXIO_Component.
References WsfObserver::WeaponFired(), WsfObserver::WeaponModeActivated(), WsfObserver::WeaponModeDeactivated(), WsfObserver::WeaponQuantityChanged(), WsfObserver::WeaponReloadEnded(), WsfObserver::WeaponTurnedOff(), and WsfObserver::WeaponTurnedOn().