WSF
WsfL16::ComputerPart Class Referenceabstract

#include <ComputerPart.hpp>

Inheritance diagram for WsfL16::ComputerPart:
Collaboration diagram for WsfL16::ComputerPart:

Classes

struct  ScriptData

Public Member Functions

 ComputerPart (WsfScenario &aScenario, const std::string &aClassName="WsfProcessor")
 ComputerPart (const ComputerPart &aSrc)
 ~ComputerPart () override
ComputerPartClone () 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)
WsfCommandChainGetCommandChain () const
ComputerProcessorGetComputer ()
WsfPlatformGetPlatform ()
WsfSimulationGetSimulation ()
const SlotParametersGetSlotParameters () 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 TypeListGetTypeList () const
bool IsA_TypeOf (WsfStringId aType) const
WsfObjectoperator= (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, ScriptDataScriptMap

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
WsfScriptContextmContextPtr
ScriptMap mSendScripts

Additional Inherited Members

Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.

Detailed Description

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).

Member Typedef Documentation

◆ ScriptMap

typedef std::map<int, ScriptData> WsfL16::ComputerPart::ScriptMap
protected

Constructor & Destructor Documentation

◆ ComputerPart() [1/2]

◆ ComputerPart() [2/2]

WsfL16::ComputerPart::ComputerPart ( const ComputerPart & aSrc)

◆ ~ComputerPart()

WsfL16::ComputerPart::~ComputerPart ( )
override

References mContextPtr.

Member Function Documentation

◆ Clone()

ComputerPart * WsfL16::ComputerPart::Clone ( ) const
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().

◆ Debug()

bool WsfL16::ComputerPart::Debug ( )
inline

◆ DebugMore()

int WsfL16::ComputerPart::DebugMore ( )
inline

References mDebugMore.

◆ GetCommandChain()

WsfCommandChain * WsfL16::ComputerPart::GetCommandChain ( ) const
inline

◆ GetComputer()

◆ GetPlatform()

◆ GetSendInterval()

double WsfL16::ComputerPart::GetSendInterval ( )
inlineprotected

References mSendInterval.

◆ GetSimulation()

◆ GetSlotParameters()

const SlotParameters & WsfL16::ComputerPart::GetSlotParameters ( ) const
inline

◆ HandleReceive()

virtual void WsfL16::ComputerPart::HandleReceive ( double aSimTime,
const Messages::InitialBase & aMessage )
pure virtual

◆ HandleSend()

virtual void WsfL16::ComputerPart::HandleSend ( double )
inlinevirtual

◆ Initialize()

◆ IsNetworkEnabled()

virtual bool WsfL16::ComputerPart::IsNetworkEnabled ( )
inlinevirtual

◆ ProcessInput()

bool WsfL16::ComputerPart::ProcessInput ( UtInput & aInput)
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'.

Parameters
aInputa reference to a UtInput object.
Returns
'true' if the command was one recognized by the class or 'false' if not.
Exceptions
UtInput::ExceptionBase(or an object derived from it) if the command was recognized but contains some sort of error.
Note
If a derived class does not recognize the command (i.e.: the return value is false) then it should call the base class ProcessInput method. This chain should continue until either the command is recognized or the top-level base class is encountered.

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().

◆ ProcessSendInterval()

double WsfL16::ComputerPart::ProcessSendInterval ( UtInput & aInput) const
protected

Referenced by ProcessInput().

◆ SendJMessage()

◆ SetDebug()

void WsfL16::ComputerPart::SetDebug ( bool aDebugOn)
inline

◆ SetPlatform()

void WsfL16::ComputerPart::SetPlatform ( WsfPlatform * aPlatformPtr)

◆ SetSendInterval()

void WsfL16::ComputerPart::SetSendInterval ( double aValue)
inline

References mSendInterval.

Member Data Documentation

◆ mCallbacks

UtCallbackHolder WsfL16::ComputerPart::mCallbacks
protected

◆ mContextPtr

◆ mDebugMore

int WsfL16::ComputerPart::mDebugMore
protected

◆ mSendInterval

◆ mSendScripts

ScriptMap WsfL16::ComputerPart::mSendScripts
protected

Referenced by Initialize(), and SendJMessage().

◆ mSlotParameters

SlotParameters WsfL16::ComputerPart::mSlotParameters
protected

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved