|
WSF
|
#include <ComputerPart.hpp>


Classes | |
| struct | ScriptData |
Public Member Functions | |
| ComputerPart (WsfScenario &aScenario, const std::string &aClassName="WsfProcessor") | |
| ComputerPart (const ComputerPart &aSrc) | |
| ~ComputerPart () override | |
| ComputerPart * | Clone () const override=0 |
| virtual bool | Initialize (double aSimTime, ComputerProcessor &aComputer) |
| virtual void | HandleReceive (double aSimTime, const Messages::InitialBase &aMessage)=0 |
| Handle an incoming message. | |
| virtual void | HandleSend (double) |
| This method is called when the a slot is open. | |
| void | SendJMessage (double aSimTime, Messages::InitialBase *aMessage) |
| bool | ProcessInput (UtInput &aInput) override |
| virtual bool | IsNetworkEnabled () |
| void | SetDebug (bool aDebugOn) |
| bool | Debug () |
| void | SetPlatform (WsfPlatform *aPlatformPtr) |
| WsfCommandChain * | GetCommandChain () const |
| ComputerProcessor * | GetComputer () |
| WsfPlatform * | GetPlatform () |
| WsfSimulation * | GetSimulation () |
| const SlotParameters & | GetSlotParameters () const |
| int | DebugMore () |
| void | SetSendInterval (double aValue) |
| 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 Types | |
| typedef std::map< int, ScriptData > | ScriptMap |
Protected Member Functions | |
| double | ProcessSendInterval (UtInput &aInput) const |
| double | GetSendInterval () |
| WsfObject (const WsfObject &aSrc) | |
| Copy constructor (for Clone()). | |
Protected Attributes | |
| IntervalUpdater | mSendInterval |
| int | mDebugMore |
| UtCallbackHolder | mCallbacks |
| SlotParameters | mSlotParameters |
| WsfScriptContext * | mContextPtr |
| ScriptMap | mSendScripts |
Additional Inherited Members | |
| Public Types inherited from WsfObject | |
| typedef std::vector< WsfStringId > | TypeList |
| The list of types returned by GetTypeList. | |
The computer part represents a function of the l16 computer (ComputerProcessor). Typical functions include PPLI and Surveillance, system status, weapon coordination, and scriptable (see associated classes that derive from ComputerPart).
|
protected |
| WsfL16::ComputerPart::ComputerPart | ( | WsfScenario & | aScenario, |
| const std::string & | aClassName = "WsfProcessor" ) |
References mContextPtr, mDebugMore, and mSendInterval.
Referenced by Clone(), WsfL16::NetworkEnabledWeaponPart::Clone(), WsfL16::PPLI_Part::Clone(), WsfL16::ScriptedPart::Clone(), WsfL16::SurveillancePart::Clone(), WsfL16::SystemStatusPart::Clone(), WsfL16::WeaponsCoordinationPart::Clone(), ComputerPart(), WsfL16::NetworkEnabledWeaponPart::NetworkEnabledWeaponPart(), WsfL16::NetworkEnabledWeaponPart::NetworkEnabledWeaponPart(), WsfL16::PPLI_Part::PPLI_Part(), WsfL16::PPLI_Part::PPLI_Part(), WsfL16::ScriptedPart::ScriptedPart(), WsfL16::ScriptedPart::ScriptedPart(), WsfL16::SurveillancePart::SurveillancePart(), WsfL16::SurveillancePart::SurveillancePart(), WsfL16::SystemStatusPart::SystemStatusPart(), WsfL16::SystemStatusPart::SystemStatusPart(), WsfL16::WeaponsCoordinationPart::WeaponsCoordinationPart(), WsfL16::WeaponsCoordinationPart::WeaponsCoordinationPart(), and WsfL16::SurveillancePart::~SurveillancePart().
| WsfL16::ComputerPart::ComputerPart | ( | const ComputerPart & | aSrc | ) |
References ComputerPart(), mContextPtr, mDebugMore, mSendInterval, mSlotParameters, and WsfObject::WsfObject().
|
override |
References mContextPtr.
|
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 WsfL16::NetworkEnabledWeaponPart, WsfL16::PPLI_Part, WsfL16::ScriptedPart, WsfL16::SurveillancePart, WsfL16::SystemStatusPart, and WsfL16::WeaponsCoordinationPart.
References ComputerPart(), and Initialize().
|
inline |
Referenced by WsfL16::SurveillancePart::HandleSend().
|
inline |
References mDebugMore.
|
inline |
|
inline |
Referenced by WsfL16::SurveillancePart::GetTrackNumber(), WsfL16::NetworkEnabledWeaponPart::HandleReceive(), WsfL16::ScriptedPart::HandleReceive(), WsfL16::WeaponsCoordinationPart::HandleReceive(), WsfL16::NetworkEnabledWeaponPart::HandleSend(), WsfL16::ScriptedPart::HandleSend(), WsfL16::SurveillancePart::HandleSend(), WsfL16::SurveillancePart::HaveReportingResponsibility(), Initialize(), WsfL16::SystemStatusPart::SendAirSystemStatus(), WsfL16::SystemStatusPart::SendLandPointSystemStatus(), and WsfL16::SystemStatusPart::SendSurfaceSystemStatus().
|
inline |
Referenced by WsfL16::SystemStatusPart::CheckWeapon(), GetSimulation(), WsfL16::SurveillancePart::HandleSend(), WsfL16::SurveillancePart::HaveReportingResponsibility(), Initialize(), WsfL16::PPLI_Part::Initialize(), WsfL16::SurveillancePart::Initialize(), WsfL16::SystemStatusPart::Initialize(), WsfL16::SurveillancePart::IsTrackReportable(), WsfL16::SystemStatusPart::SendAirSystemStatus(), SendJMessage(), WsfL16::SystemStatusPart::SendLandPointSystemStatus(), and WsfL16::SystemStatusPart::WeaponQuantity().
|
inlineprotected |
References mSendInterval.
| WsfSimulation * WsfL16::ComputerPart::GetSimulation | ( | ) |
|
inline |
References mSlotParameters.
Referenced by WsfL16::ComputerProcessor::SentJMessage().
|
pure virtual |
Handle an incoming message.
Implemented in WsfL16::NetworkEnabledWeaponPart, WsfL16::PPLI_Part, WsfL16::ScriptedPart, WsfL16::SurveillancePart, WsfL16::SystemStatusPart, and WsfL16::WeaponsCoordinationPart.
|
inlinevirtual |
This method is called when the a slot is open.
Reimplemented in WsfL16::NetworkEnabledWeaponPart, WsfL16::PPLI_Part, WsfL16::ScriptedPart, WsfL16::SurveillancePart, WsfL16::SystemStatusPart, and WsfL16::WeaponsCoordinationPart.
Referenced by Initialize().
|
virtual |
Reimplemented in WsfL16::NetworkEnabledWeaponPart, WsfL16::PPLI_Part, WsfL16::ScriptedPart, WsfL16::SurveillancePart, WsfL16::SystemStatusPart, and WsfL16::WeaponsCoordinationPart.
References classPtr, WsfComponentList::GetComponent(), GetComputer(), WsfCommandChain::GetDefaultNameId(), GetPlatform(), WsfPlatformPart::GetPlatform(), HandleSend(), mCallbacks, mContextPtr, WsfL16::ComputerPart::ScriptData::mMessageScriptClass, WsfL16::ComputerPart::ScriptData::mScript, mSendInterval, mSendScripts, and ok.
Referenced by Clone(), WsfL16::NetworkEnabledWeaponPart::Initialize(), WsfL16::PPLI_Part::Initialize(), WsfL16::ScriptedPart::Initialize(), WsfL16::SurveillancePart::Initialize(), WsfL16::SystemStatusPart::Initialize(), and WsfL16::WeaponsCoordinationPart::Initialize().
|
inlinevirtual |
Reimplemented in WsfL16::NetworkEnabledWeaponPart.
|
overridevirtual |
Process input from a generic source.
Examine the current input command. If it is NOT one of the commands recognized by this class then it simply returns 'false'. If it is one of the commands recognized by this class then it processes the command and returns 'true'.
| aInput | a reference to a UtInput object. |
| UtInput::ExceptionBase | (or an object derived from it) if the command was recognized but contains some sort of error. |
Reimplemented from WsfObject.
Reimplemented in WsfL16::NetworkEnabledWeaponPart, WsfL16::PPLI_Part, WsfL16::ScriptedPart, WsfL16::SurveillancePart, WsfL16::SystemStatusPart, and WsfL16::WeaponsCoordinationPart.
References mContextPtr, mDebugMore, mSendInterval, mSlotParameters, and ProcessSendInterval().
Referenced by WsfL16::NetworkEnabledWeaponPart::ProcessInput(), WsfL16::PPLI_Part::ProcessInput(), WsfL16::ScriptedPart::ProcessInput(), WsfL16::SurveillancePart::ProcessInput(), WsfL16::SystemStatusPart::ProcessInput(), and WsfL16::WeaponsCoordinationPart::ProcessInput().
|
protected |
Referenced by ProcessInput().
| void WsfL16::ComputerPart::SendJMessage | ( | double | aSimTime, |
| Messages::InitialBase * | aMessage ) |
References WsfComponentList::RoleIterator< T >::AtEnd(), wsf::comm::util::cCOMMANDER, wsf::comm::util::cPEERS, wsf::comm::util::cSUBORDINATES, WsfSimulation::GetCommNetworkManager(), WsfObject::GetName(), GetPlatform(), GetSimulation(), mContextPtr, WsfL16::ComputerPart::ScriptData::mMessageScriptClass, WsfL16::ComputerPart::ScriptData::mScript, mSendScripts, wsf::comm::util::SelectRecipients(), and WsfMessage::SetGroup().
Referenced by WsfL16::SystemStatusPart::SendAirSystemStatus(), WsfL16::SurveillancePart::SendAirTrack(), WsfL16::SystemStatusPart::SendLandPointSystemStatus(), WsfL16::SurveillancePart::SendLandTrack(), WsfL16::SurveillancePart::SendSpaceTrack(), WsfL16::SurveillancePart::SendSubsurfaceTrack(), WsfL16::SystemStatusPart::SendSurfaceSystemStatus(), and WsfL16::SurveillancePart::SendSurfaceTrack().
|
inline |
| void WsfL16::ComputerPart::SetPlatform | ( | WsfPlatform * | aPlatformPtr | ) |
References WsfPlatform::GetScriptContext(), and mContextPtr.
|
inline |
References mSendInterval.
|
protected |
Referenced by Initialize(), and WsfL16::SurveillancePart::Initialize().
|
protected |
Referenced by ComputerPart(), ComputerPart(), WsfL16::NetworkEnabledWeaponPart::HandleReceive(), WsfL16::ScriptedPart::HandleReceive(), WsfL16::NetworkEnabledWeaponPart::HandleSend(), WsfL16::ScriptedPart::HandleSend(), Initialize(), WsfL16::NetworkEnabledWeaponPart::Initialize(), WsfL16::ScriptedPart::Initialize(), WsfL16::NetworkEnabledWeaponPart::NetworkEnabledWeaponPart(), ProcessInput(), WsfL16::ScriptedPart::ProcessInput(), WsfL16::ScriptedPart::ScriptedPart(), SendJMessage(), SetPlatform(), WsfL16::SurveillancePart::SurveillancePart(), WsfL16::SurveillancePart::SurveillancePart(), and ~ComputerPart().
|
protected |
Referenced by ComputerPart(), ComputerPart(), DebugMore(), and ProcessInput().
|
protected |
Referenced by ComputerPart(), ComputerPart(), GetSendInterval(), Initialize(), WsfL16::PPLI_Part::PPLI_Part(), ProcessInput(), SetSendInterval(), WsfL16::SurveillancePart::SurveillancePart(), WsfL16::SystemStatusPart::SystemStatusPart(), and WsfL16::WeaponsCoordinationPart::WeaponsCoordinationPart().
|
protected |
Referenced by Initialize(), and SendJMessage().
|
protected |
Referenced by ComputerPart(), GetSlotParameters(), and ProcessInput().