|
WSF
|
#include <WsfScriptProcessor.hpp>


Public Member Functions | |
| WsfScriptProcessor (const WsfScenario &aScenario) | |
| WsfScriptProcessor (const WsfScenario &aScenario, WsfStringId aPartClass, const std::string &aPartVarName) | |
| ~WsfScriptProcessor () override | |
| WsfProcessor * | Clone () const override |
| bool | Initialize (double aSimTime) override |
| bool | Initialize2 (double aSimTime) override |
| bool | ProcessInput (UtInput &aInput) override |
| void | Update (double aSimTime) override |
| bool | ProcessMessage (double aSimTime, const WsfMessage &aMessage) override |
| void | SendMessage (double aSimTime, const WsfMessage &aMessage) override |
| virtual void | ExecuteOnMessageCreate (double aSimTime, WsfMessage &aMessage) |
| virtual bool | ExecuteScript (double aSimTime, const std::string &aScriptName) |
| virtual bool | ExecuteScript (double aSimTime, WsfStringId aScriptName, UtScriptData &aScriptRetVal, const UtScriptDataList &aScriptArgs=UtScriptDataList()) |
| void | ExecuteScriptAtTime (double aTime, WsfStringId aScriptName, const UtScriptDataList &aScriptArgs) |
| virtual void | SuppressMessage (bool aSuppressMessage) |
| WsfScriptMessageHandler * | GetMessageHandler () |
| WsfScriptContext & | GetScriptContext () |
| UtScriptContext * | GetScriptAccessibleContext () const override |
| void | SetPlatform (WsfPlatform *aPlatformPtr) override |
| const WsfBehaviorTree * | BehaviorTree () const |
| WsfAdvancedBehaviorTree * | AdvancedBehaviorTree () const |
| virtual const WsfScriptStateMachine * | GetStateMachine () const |
| wsf::ExternalLinks & | GetExternalLinks () |
| std::string | State () |
| std::string | StateAll () |
| void | SetState (std::string &stateName) |
| void | SetStateAll (std::string &stateNameAll) |
| Public Member Functions inherited from WsfProcessor | |
| WsfProcessor (const WsfScenario &aScenario) | |
| ~WsfProcessor () override=default | |
| ComponentList & | GetComponents () |
| const ComponentList & | GetComponents () const |
| virtual void | ProcessCallback (double aSimTime, const WsfCallback &aCallback) |
| WsfComponent * | CloneComponent () const override |
| const int * | GetComponentRoles () const override |
| void * | QueryInterface (int aRole) override |
| int | GetComponentInitializationOrder () const override |
| const char * | GetScriptClassName () const override |
| bool | PreInitialize (double aSimTime) override |
| void | PreInput () override |
| void | TurnOff (double aSimTime) override |
| void | TurnOn (double aSimTime) override |
| void | SetNonOperational (double aSimTime) override |
| void | SetOperational (double aSimTime) override |
| void | PartBroken (double aSimTime) override |
| double | GetUpdateInterval () const override |
| void | SetUpdateInterval (double aUpdateInterval) override |
| Public Member Functions inherited from WsfPlatformPart | |
| WsfPlatformPart (const WsfScenario &aScenario, int aPartType) | |
| WsfPlatformPart & | operator= (const WsfPlatformPart &aRhs)=delete |
| ~WsfPlatformPart () override | |
| bool | DebugEnabled () const |
| Returns 'true' if debugging is enabled for this instance. | |
| void | SetDebugEnabled (bool aDebugEnabled) |
| unsigned int | GetDebugMask () |
| bool | IsExternallyControlled () const |
| virtual void | SetExternallyControlled (double aSimTime, bool aIsExternallyControlled) |
| int | GetPartType () const |
| const char * | GetScriptClassName () const override |
| WsfSimulation * | GetSimulation () const |
| const WsfScenario & | GetScenario () const |
| WsfStringId | GetComponentName () const override |
| void | ComponentParentChanged (WsfPlatform *aPlatformPtr) override |
| WsfPlatform * | GetPlatform () const |
| virtual void | PlatformAdded (double aSimTime, WsfPlatform *aPlatformPtr) |
| virtual void | PlatformDeleted (WsfPlatform *aPlatformPtr) |
| double | GetLastStatusChangeTime () const |
| void | SetLastStatusChangeTime (double aSimTime) |
| Allows a system to set the time at which the device was initialized. | |
| bool | CanBeMadeOperational () const |
| Returns an indication that this system can be made operational. | |
| bool | CanBeMadeNonOperational () const |
| Returns an indication that this system can be made non-operational. | |
| bool | CanBeTurnedOn () const |
| Returns an indication that this system can be turned on. | |
| bool | CanBeTurnedOff () const |
| Returns an indication that this system can be turned off. | |
| bool | IsTurnedOn () const |
| bool | InitiallyTurnedOn () const |
| Is the system to be turned 'on' when added to the simulation? | |
| void | SetInitiallyTurnedOn (bool aInitiallyTurnedOn) |
| Sets if the system is turned on when added to the simulation. | |
| virtual void | Restore (double aSimTime) |
| bool | IsOperational () const |
| bool | SetOperational (double aSimTime, bool aMakeOperational) |
| double | GetDamageFactor () const |
| bool | SetDamageFactor (double aSimTime, double aDamageFactor) |
| bool | IsCritical () const |
| void | SetCritical (bool aValue) |
| virtual void | OnPlatformBrokenEvent (double aSimTime) |
| Owning platform has issued a broken event. | |
| bool | IsBroken () const |
| WsfInternalLinks & | GetInternalLinks () |
| Return the internal links for this part. | |
| virtual bool | HasInternalLinks () const |
| Does this platform part have a communication link to other platform parts? | |
| virtual bool | ReceiveMessage (double aSimTime, const WsfMessage &aMessage) |
| virtual void | SendMessageTo (double aSimTime, const WsfMessage &aMessage, WsfStringId aRecipientId) |
| void | SendMessageToProcessor (double aSimTime, const WsfMessage &aMessage, WsfStringId aRecipientId) |
| virtual void | SendQueuedMessages (double aSimTime) |
| const WsfCategoryList & | GetCategories () const |
| Get the categories to which this part belongs. | |
| void | AddCategory (WsfStringId aCategoryId) |
| Adds the provided category to the platform part's category list. | |
| bool | IsCategoryMember (WsfStringId aCategoryId) const |
| const WsfGroupList & | GetGroups () const |
| Get the groups to which this platform part belongs. | |
| void | JoinGroup (WsfGroup *aGroupPtr) |
| Join the given group. | |
| void | LeaveGroup (WsfGroup *aGroupPtr) |
| Leave the given group. | |
| bool | IsGroupMember (WsfStringId aGroupId) |
| unsigned int | GetUpdateEventEpoch () const |
| void | IncrementUpdateEventEpoch () |
| bool | UpdateEventActive () const |
| Is an 'Update' event active? | |
| void | SetUpdateEventActive (bool aUpdateEventActive) |
| Indicate if the 'Update' event is active. | |
| 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) |
| Public Member Functions inherited from WsfComponentT< WsfPlatform > | |
| WsfComponentT () | |
| WsfComponentT (const WsfComponentT &) noexcept | |
| WsfComponentT & | operator= (const WsfComponentT &) noexcept |
| ~WsfComponentT () override=default | |
| ParentType * | GetComponentParent () const |
| void | SetComponentParent (ParentType *aParentPtr) |
| Public Member Functions inherited from WsfComponent | |
| virtual | ~WsfComponent ()=default |
| template<typename T> | |
| bool | QueryInterfaceT (T *&aRolePtr) |
| bool | ComponentHasRole (int aRole) |
| Returns true if the component has the specified role. | |
| Public Member Functions inherited from WsfUniqueId | |
| WsfUniqueId () | |
| Construtor initializes the unique identifier to 0. | |
| WsfUniqueId (const WsfUniqueId &) | |
| Copy constructor initializes the unique identifier to 0. | |
| WsfUniqueId & | operator= (const WsfUniqueId &) |
| unsigned int | GetUniqueId () const |
| Get the unique identifier assigned to this object. | |
| template<typename T> | |
| void | Serialize (T &aBuff) |
| For XIO (de)serialization. | |
| Public Member Functions inherited from WsfAuxDataEnabled | |
| WsfAuxDataEnabled ()=default | |
| WsfAuxDataEnabled (const WsfAuxDataEnabled &aSrc)=default | |
| WsfAuxDataEnabled & | operator= (const WsfAuxDataEnabled &aRhs) |
| WsfAuxDataEnabled (WsfAuxDataEnabled &&)=default | |
| WsfAuxDataEnabled & | operator= (WsfAuxDataEnabled &&)=default |
| virtual | ~WsfAuxDataEnabled () noexcept |
| void | SetAuxData (const WsfAttributeContainer &aAuxData) |
| void | DeleteAuxData () |
| Delete the aux data container from the object. | |
| void | MergeAuxData (const WsfAuxDataEnabled &aSrc) |
| Merge the object's aux data with aux data from an existing object. | |
| void | UpdateAuxData (const WsfAuxDataEnabled &aSrc) |
| Update the object's aux data with aux data from an existing object. | |
| bool | HasAuxData () const |
| Returns true if this object has aux data. | |
| bool | ProcessInput (UtInput &aInput) |
| template<typename T> | |
| void | Serialize (T &aBuff) |
| (De)serialization for XIO | |
| WsfAttributeContainer & | GetAuxData () |
| const WsfAttributeContainer & | GetAuxData () const noexcept |
| const WsfAttributeContainer & | GetAuxDataConst () const noexcept |
Protected Member Functions | |
| WsfScriptProcessor (const WsfScriptProcessor &aSrc) | |
| WsfProcessor (const WsfProcessor &aSrc) | |
| Copy constructor (for Clone()). | |
| WsfProcessor & | operator= (const WsfProcessor &aRhs)=delete |
| WsfPlatformPart (const WsfPlatformPart &aSrc) | |
| Copy constructor (for Clone()). | |
| WsfObject (const WsfObject &aSrc) | |
| Copy constructor (for Clone()). | |
| Protected Member Functions inherited from WsfUniqueId | |
| void | AssignUniqueId (WsfSimulation *aSimulationPtr) |
Protected Attributes | |
| WsfScriptContext * | mContextPtr |
| Pointer to the script context. | |
| WsfScriptMessageHandler * | mMessageHandlerPtr |
| Pointer to the 'on_message' handler. | |
| UtScript * | mOnMessageCreateScriptPtr |
| Pointer to the 'on_message_create' script. | |
| UtScriptClass * | mMessageClassPtr |
| wsf::ExternalLinks | mExternalLinks |
| The external recipients. | |
| WsfBehaviorTree * | mBehaviorTreePtr |
| ut::CloneablePtr< WsfAdvancedBehaviorTree > | mAdvancedBehaviorTreePtr |
| std::unique_ptr< WsfScriptStateMachine > | mStateMachinePtr |
| int | mStateIndex |
| bool | mSuppressMessage |
Additional Inherited Members | |
| using | ComponentList = WsfComponentListT<WsfProcessorComponent> |
| Public Types inherited from WsfPlatformPart | |
| enum | { cLEVEL_ONE_DEBUG = 0x00000001 , cLEVEL_TWO_DEBUG = 0x00000002 } |
| using | InternalMessageQueue = std::queue<WsfMessage*> |
| using | RecipientMessageQueue = std::queue<std::pair<WsfPlatformPart*, WsfMessage*>> |
| Public Types inherited from WsfObject | |
| typedef std::vector< WsfStringId > | TypeList |
| The list of types returned by GetTypeList. | |
| Public Types inherited from WsfComponentT< WsfPlatform > | |
| typedef WsfPlatform | ParentType |
| This is needed to support the WsfComponentList template. | |
| Static Public Attributes inherited from WsfAuxDataEnabled | |
| static UtCallbackListN< void(const WsfAuxDataEnabled *)> | AuxDataAccessed |
| static UtCallbackListN< void(const WsfAuxDataEnabled *)> | AuxDataDestroyed |
WsfScriptProcessor provides a means to execute scripts on simulation updates and message processing. From within an input file the user can specify an "on_update" script (i.e. script void on_update() ... end_script). During runtime, each call to Update will subsequently call the "on update" script. The same holds true for the processing of messages, a user can specify a custom script named "on_message" and it will be called during runtime each time ProcessInput is called. In addition, the following variables will be available to the scripts:
PLATFORM A reference to the platform that owns the script processor. PROCESSOR A reference to script processor. TIME_NOW The current simulation time in seconds. MESSAGE A reference to the message currently being processed (applicable to on_message).
| WsfScriptProcessor::WsfScriptProcessor | ( | const WsfScenario & | aScenario | ) |
References GetScriptContext(), mAdvancedBehaviorTreePtr, mBehaviorTreePtr, mContextPtr, mExternalLinks, mMessageClassPtr, mMessageHandlerPtr, mOnMessageCreateScriptPtr, mStateIndex, mSuppressMessage, and WsfProcessor::WsfProcessor().
Referenced by Clone(), WsfAssetManager::WsfAssetManager(), WsfAssetManager::WsfAssetManager(), WsfAssetManager::WsfAssetManager(), WsfBattleManager::WsfBattleManager(), WsfBattleManager::WsfBattleManager(), WsfBMDisseminateC2::WsfBMDisseminateC2(), WsfBMDisseminateC2::WsfBMDisseminateC2(), WsfBMSensorsManager::WsfBMSensorsManager(), WsfBMSensorsManager::WsfBMSensorsManager(), WsfBMWeaponsManager::WsfBMWeaponsManager(), WsfBMWeaponsManager::WsfBMWeaponsManager(), WsfExchangeProcessor::WsfExchangeProcessor(), WsfExchangeProcessor::WsfExchangeProcessor(), WsfFusionCenter::WsfFusionCenter(), WsfFusionCenter::WsfFusionCenter(), WsfGuidanceComputer::WsfGuidanceComputer(), WsfGuidanceComputer::WsfGuidanceComputer(), WsfMessageProcessor::WsfMessageProcessor(), WsfMessageProcessor::WsfMessageProcessor(), WsfOrbitalConjunctionProcessor::WsfOrbitalConjunctionProcessor(), WsfOrbitalConjunctionProcessor::WsfOrbitalConjunctionProcessor(), WsfOrbitalConjunctionProcessor::WsfOrbitalConjunctionProcessor(), WsfPerceptionProcessor::WsfPerceptionProcessor(), WsfPerceptionProcessor::WsfPerceptionProcessor(), WsfRIPRProcessor::WsfRIPRProcessor(), WsfRIPRProcessor::WsfRIPRProcessor(), WsfRIPRProcessor::WsfRIPRProcessor(), WsfRIPRProcessor::WsfRIPRProcessor(), WsfSA_Processor::WsfSA_Processor(), WsfSA_Processor::WsfSA_Processor(), WsfScriptProcessor(), WsfScriptStateMachineProcessor::WsfScriptStateMachineProcessor(), WsfScriptStateMachineProcessor::WsfScriptStateMachineProcessor(), WsfTaskManager::WsfTaskManager(), WsfTaskManager::WsfTaskManager(), WsfThreatProcessor::WsfThreatProcessor(), WsfThreatProcessor::WsfThreatProcessor(), WsfThreatProcessor::WsfThreatProcessor(), WsfTrackProcessor::WsfTrackProcessor(), WsfTrackProcessor::WsfTrackProcessor(), WsfTrackStateControllerProcessor::WsfTrackStateControllerProcessor(), WsfTrackStateControllerProcessor::WsfTrackStateControllerProcessor(), WsfUplinkProcessor::WsfUplinkProcessor(), WsfUplinkProcessor::WsfUplinkProcessor(), WsfWeaponFuse::WsfWeaponFuse(), WsfWeaponFuse::WsfWeaponFuse(), WsfWeaponThreatProcessor::WsfWeaponThreatProcessor(), and WsfWeaponThreatProcessor::WsfWeaponThreatProcessor().
| WsfScriptProcessor::WsfScriptProcessor | ( | const WsfScenario & | aScenario, |
| WsfStringId | aPartClass, | ||
| const std::string & | aPartVarName ) |
|
override |
References mBehaviorTreePtr, mContextPtr, and mMessageHandlerPtr.
|
protected |
| WsfAdvancedBehaviorTree * WsfScriptProcessor::AdvancedBehaviorTree | ( | ) | const |
References mAdvancedBehaviorTreePtr, mStateIndex, and mStateMachinePtr.
Referenced by UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().
|
inline |
References mBehaviorTreePtr.
Referenced by UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().
|
overridevirtual |
Create a clone of this object.
Implements WsfProcessor.
Reimplemented in WsfScriptStateMachineProcessor, WsfSensorsManagerFov, WsfSimpleSensorsManager, WsfTaskManager, WsfTaskProcessor, WsfThreatProcessor, WsfTrackProcessor, WsfTrackStateControllerProcessor, WsfUnclassifiedAssetManager, WsfUnclassifiedBattleManager, WsfUnclassifiedDisseminateC2, WsfUplinkProcessor, WsfWeaponFuse, WsfWeaponsManagerAI, WsfWeaponsManagerSAM, and WsfWeaponThreatProcessor.
References WsfProcessor::WsfProcessor(), and WsfScriptProcessor().
|
virtual |
Let the user examine/modify the outbound message prior to it being sent. This is primarily to let them set the message priority.
| aSimTime | The current simulation time. |
| aMessage | The message to be transmitted. |
References mContextPtr, mMessageClassPtr, and mOnMessageCreateScriptPtr.
Referenced by WsfTrackProcessor::SendTrackP().
|
virtual |
References mContextPtr.
Referenced by WsfScriptCallback::Execute(), WsfScriptEvent::Execute(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().
|
virtual |
References mContextPtr.
| void WsfScriptProcessor::ExecuteScriptAtTime | ( | double | aTime, |
| WsfStringId | aScriptName, | ||
| const UtScriptDataList & | aScriptArgs ) |
Execute the script with the specified string name ID at the specified time.
| aTime | The time at which to execute the script. |
| aScriptName | The string name ID of the script to be executed. |
| aScriptArgs | The list of arguments to pass to the script. |
References WsfSimulation::AddEvent(), and WsfPlatformPart::GetSimulation().
|
inline |
References mExternalLinks.
|
inline |
References mMessageHandlerPtr.
Referenced by WsfSA_Perceive::ProcessMessage(), and WsfTrackProcessor::ProcessMessage().
|
override |
References mContextPtr.
|
inline |
References mContextPtr.
Referenced by WsfScriptQuantumTaskerProcessor::GetContext(), WsfScriptRIPRProcessorClass::GetContext(), WsfScriptSA_ProcessorClass::GetContext(), WsfScriptUplinkProcessor::GetContext(), WsfScriptWeaponThreatProcessorClass::GetContext(), WsfXIO_ScriptService::HandleInformationRequest(), WsfQuantumTaskerProcessor::Initialize(), WsfSA_Assess::Initialize(), WsfSA_Perceive::Initialize(), WsfSA_Predict::Initialize(), WsfScriptCallback::Initialize(), WsfTaskManager::Initialize(), WsfPerceptionProcessor::ProcessInput(), WsfInterceptCalculator::ScriptCalculatorExists(), UT_DEFINE_SCRIPT_METHOD(), WsfPerceptionProcessor::WsfPerceptionProcessor(), WsfScriptProcessor(), and WsfScriptProcessor().
|
inlinevirtual |
Reimplemented in WsfScriptStateMachineProcessor.
References mStateMachinePtr.
|
overridevirtual |
Perform phase 1 initialization of the part. This is invoked by WsfPlatform::Initialize() during phase 1 initialization of the platform. During phase 1 initialization, platform components must not assume the existence of ANY data that is the responsibility of another platform component. In particular, the platform location and initial tracks cannot be assumed to be valid.
| aSimTime | The current simulation time. |
Reimplemented from WsfProcessor.
Reimplemented in WsfScriptStateMachineProcessor, WsfSensorsManagerFov, WsfSimpleSensorsManager, WsfTaskManager, WsfTaskProcessor, WsfThreatProcessor, WsfTrackProcessor, WsfTrackStateControllerProcessor, WsfUplinkProcessor, WsfWeaponFuse, WsfWeaponsManagerAI, WsfWeaponsManagerSAM, and WsfWeaponThreatProcessor.
References WsfPlatformPart::GetPlatform(), WsfProcessor::Initialize(), mAdvancedBehaviorTreePtr, mBehaviorTreePtr, mContextPtr, mExternalLinks, mMessageHandlerPtr, mOnMessageCreateScriptPtr, mStateIndex, mStateMachinePtr, and ok.
Referenced by wsf::six_dof::GuidanceComputer::Initialize(), WsfAssetManager::Initialize(), WsfBattleManager::Initialize(), WsfBMDisseminateC2::Initialize(), WsfBMSensorsManager::Initialize(), WsfBMWeaponsManager::Initialize(), WsfExchangeProcessor::Initialize(), WsfFusionCenter::Initialize(), WsfGuidanceComputer::Initialize(), WsfMessageProcessor::Initialize(), WsfOrbitalConjunctionProcessor::Initialize(), WsfP6DOF_GuidanceComputer::Initialize(), WsfPerceptionProcessor::Initialize(), WsfRIPRProcessor::Initialize(), WsfSA_Processor::Initialize(), WsfScriptStateMachineProcessor::Initialize(), WsfTaskManager::Initialize(), WsfThreatProcessor::Initialize(), WsfTrackProcessor::Initialize(), WsfTrackStateControllerProcessor::Initialize(), WsfUplinkProcessor::Initialize(), WsfWeaponFuse::Initialize(), and WsfWeaponThreatProcessor::Initialize().
|
overridevirtual |
Perform phase 2 initialization of the part. This is invoked by WsfPlatform::Initialize() during phase 2 initialization of the platform. During phase 2, platform components may assume that the platform location has been defined, initial tracks have been loaded and that all components have completed phase 1 initialization.
| aSimTime | The current simulation time. |
Reimplemented from WsfProcessor.
Reimplemented in WsfSensorsManagerFov, WsfSimpleSensorsManager, WsfTaskManager, WsfTaskProcessor, WsfWeaponFuse, WsfWeaponsManagerAI, and WsfWeaponsManagerSAM.
References WsfProcessor::Initialize2(), mContextPtr, and ok.
Referenced by WsfAssetManager::Initialize2(), WsfBattleManager::Initialize2(), WsfBMDisseminateC2::Initialize2(), WsfBMSensorsManager::Initialize2(), WsfBMWeaponsManager::Initialize2(), WsfGuidanceComputer::Initialize2(), WsfRIPRProcessor::Initialize2(), WsfSA_Processor::Initialize2(), WsfTaskManager::Initialize2(), WsfWeaponFuse::Initialize2(), and WsfQuantumTaskerProcessor::operator=().
|
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 WsfProcessor.
Reimplemented in WsfScriptStateMachineProcessor, WsfSensorsManagerFov, WsfSimpleSensorsManager, WsfTaskManager, WsfTaskProcessor, WsfThreatProcessor, WsfTrackProcessor, WsfTrackStateControllerProcessor, WsfUnclassifiedAssetManager, WsfUnclassifiedBattleManager, WsfUnclassifiedDisseminateC2, WsfUplinkProcessor, WsfWeaponFuse, WsfWeaponsManagerAI, WsfWeaponsManagerSAM, and WsfWeaponThreatProcessor.
References EditBehavior(), WsfPlatformPart::GetScenario(), mAdvancedBehaviorTreePtr, mBehaviorTreePtr, mContextPtr, mExternalLinks, mMessageHandlerPtr, mStateMachinePtr, WsfProcessor::ProcessInput(), and WsfScriptStateMachine::State::ProcessInput().
Referenced by WsfAssetManager::ProcessInput(), WsfBattleManager::ProcessInput(), WsfBMDisseminateC2::ProcessInput(), WsfBMSensorsManager::ProcessInput(), WsfBMWeaponsManager::ProcessInput(), WsfExchangeProcessor::ProcessInput(), WsfFusionCenter::ProcessInput(), WsfGuidanceComputer::ProcessInput(), WsfMessageProcessor::ProcessInput(), WsfOrbitalConjunctionProcessor::ProcessInput(), WsfP6DOF_GuidanceComputer::ProcessInput(), WsfPerceptionProcessor::ProcessInput(), WsfRIPRProcessor::ProcessInput(), WsfSA_Processor::ProcessInput(), WsfScriptStateMachineProcessor::ProcessInput(), WsfTaskManager::ProcessInput(), WsfThreatProcessor::ProcessInput(), WsfTrackProcessor::ProcessInput(), WsfTrackStateControllerProcessor::ProcessInput(), WsfUplinkProcessor::ProcessInput(), WsfWeaponFuse::ProcessInput(), and WsfWeaponThreatProcessor::ProcessInput().
|
overridevirtual |
Process a received message.
| aSimTime | The current simulation time. |
| aMessage | The message that is being sent. |
Reimplemented from WsfPlatformPart.
Reimplemented in WsfScriptStateMachineProcessor, WsfTaskManager, WsfTaskProcessor, WsfTrackProcessor, WsfTrackStateControllerProcessor, WsfUplinkProcessor, and WsfWeaponThreatProcessor.
References mAdvancedBehaviorTreePtr, mBehaviorTreePtr, mMessageHandlerPtr, mSuppressMessage, WsfAdvancedBehaviorTreeNode::ProcessMessage(), WsfBehaviorTreeNode::ProcessMessage(), and SendMessage().
Referenced by WsfAssetManager::ProcessMessage(), WsfBattleManager::ProcessMessage(), WsfBMDisseminateC2::ProcessMessage(), WsfBMSensorsManager::ProcessMessage(), WsfBMWeaponsManager::ProcessMessage(), WsfQuantumTaskerProcessor::ProcessMessage(), WsfRIPRProcessor::ProcessMessage(), and WsfTrackStateControllerProcessor::ProcessMessage().
|
overridevirtual |
A convenience for derived classes to send a message to linked objects.
| aSimTime | The current simulation time. |
| aMessage | The message to be sent. |
Reimplemented from WsfPlatformPart.
References mExternalLinks, and WsfPlatformPart::SendMessage().
Referenced by ProcessMessage(), and WsfMessageProcessor::SendMessage().
|
overridevirtual |
Set the platform to which this part is associated.
| aPlatformPtr | Pointer to the containing platform. |
Reimplemented from WsfPlatformPart.
References WsfPlatform::GetScriptContext(), mContextPtr, and WsfPlatformPart::SetPlatform().
| void WsfScriptProcessor::SetState | ( | std::string & | stateName | ) |
References mStateIndex, and mStateMachinePtr.
Referenced by UT_DEFINE_SCRIPT_METHOD().
| void WsfScriptProcessor::SetStateAll | ( | std::string & | stateNameAll | ) |
References WsfScriptStateMachine::State::ChildStateIndex(), WsfScriptStateMachine::State::ChildStateMachine(), WsfScriptStateMachine::EnterState(), WsfScriptStateMachine::ExitState(), WsfScriptStateMachine::GetState(), WsfScriptStateMachine::GetStateIndex(), mStateIndex, mStateMachinePtr, and WsfScriptStateMachine::State::SetChildStateIndex().
Referenced by UT_DEFINE_SCRIPT_METHOD().
| std::string WsfScriptProcessor::State | ( | ) |
References mStateIndex, and mStateMachinePtr.
Referenced by UT_DEFINE_SCRIPT_METHOD().
| std::string WsfScriptProcessor::StateAll | ( | ) |
|
virtual |
Indicate if forwarding of the current message to linked recipients should be suppressed.
This is invoked from scripts in the user message handler to declare if the message being processed should be prevented from the normal forwarding to linked recipients. When each message is received the suppression flag is set to false. The script message handler can then call SupressMessage() to suppress the eventual forwarding of the message. being processed should be forwarded to linked recipients. When each message is received, the flag is cleared that
| aSuppressMessage | If true, suppress the forwarding of the message to linked recipients. |
References mSuppressMessage.
Referenced by UT_DEFINE_SCRIPT_METHOD().
|
overridevirtual |
Update the state of the processor. This method should perform any actions that are necessary so that the system reflects its condition at the supplied time.
| aSimTime | The current simulation time. |
Reimplemented from WsfProcessor.
Reimplemented in WsfScriptStateMachineProcessor, WsfSimpleSensorsManager, WsfTaskManager, WsfThreatProcessor, WsfWeaponFuse, WsfWeaponsManagerAI, and WsfWeaponsManagerSAM.
References mAdvancedBehaviorTreePtr, mBehaviorTreePtr, mContextPtr, mStateIndex, and mStateMachinePtr.
Referenced by WsfAssetManager::Run(), WsfBattleManager::Run(), WsfBMDisseminateC2::Run(), WsfBMSensorsManager::Run(), WsfBMWeaponsManager::Run(), WsfAssetManager::Update(), WsfBattleManager::Update(), WsfBMDisseminateC2::Update(), WsfBMSensorsManager::Update(), WsfBMWeaponsManager::Update(), WsfMessageProcessor::Update(), WsfOrbitalConjunctionProcessor::Update(), WsfPerceptionProcessor::Update(), WsfQuantumTaskerProcessor::Update(), WsfRIPRProcessor::Update(), WsfScriptStateMachineProcessor::Update(), WsfTaskManager::Update(), and WsfThreatProcessor::Update().
|
protected |
|
protected |
|
protected |
Pointer to the script context.
Referenced by WsfQuantumTaskerProcessor::AssigneesForTask(), WsfTaskManager::CancelTask(), WsfGuidanceComputer::CheckForPhaseChange(), WsfP6DOF_GuidanceComputer::CheckForPhaseChange(), WsfThreatProcessor::DroppedThreat(), WsfExchangeProcessor::ExchangeCompleted(), WsfExchangeProcessor::ExchangeRequestFailed(), ExecuteOnMessageCreate(), ExecuteScript(), ExecuteScript(), GetScriptAccessibleContext(), GetScriptContext(), WsfThreatProcessor::IdentifiedNewThreat(), WsfExchangeProcessor::Initialize(), WsfGuidanceComputer::Initialize(), WsfImageProcessor::Initialize(), WsfMessageProcessor::Action::Initialize(), WsfMessageProcessor::Initialize(), WsfMessageProcessor::Selector::Initialize(), WsfOrbitalConjunctionProcessor::Initialize(), WsfRIPRProcessor::Initialize(), Initialize(), WsfThreatProcessor::Initialize(), WsfTrackStateControllerProcessor::Initialize(), Initialize2(), WsfTaskManager::Initialize2(), WsfTrackProcessor::InitializeMemberData(), WsfTrackProcessor::IsTrackReportable(), WsfMessageProcessor::Selector::Matches(), WsfTaskManager::OperatingLevelChanged(), WsfWeaponFuse::PrivateDetonate(), WsfMessageProcessor::ProcessAction(), WsfGuidanceComputer::ProcessInput(), WsfMessageProcessor::Action::ProcessInput(), WsfMessageProcessor::Selector::ProcessInput(), WsfOrbitalConjunctionProcessor::ProcessInput(), WsfP6DOF_GuidanceComputer::ProcessInput(), WsfQuantumTaskerProcessor::ProcessInput(), WsfRIPRProcessor::ProcessInput(), ProcessInput(), WsfThreatProcessor::ProcessInput(), WsfRIPRProcessor::QueryBid(), WsfTaskManager::ReportTaskComplete(), wsf::six_dof::GuidanceComputer::SelectPhase(), WsfGuidanceComputer::SelectPhase(), WsfP6DOF_GuidanceComputer::SelectPhase(), SetPlatform(), WsfTaskManager::TaskAssigned(), WsfTaskManager::TaskAssignSent(), WsfTaskManager::TaskCanceled(), WsfTaskManager::TaskCompleted(), WsfOrbitalConjunctionProcessor::Update(), WsfSA_Processor::Update(), Update(), WsfSA_Processor::UpdateBehaviorCalculation(), wsf::six_dof::GuidanceComputer::UpdateGuidance(), WsfGuidanceComputer::UpdateGuidance(), WsfExchangeProcessor::WsfExchangeProcessor(), WsfExchangeProcessor::WsfExchangeProcessor(), WsfOrbitalConjunctionProcessor::WsfOrbitalConjunctionProcessor(), WsfRIPRProcessor::WsfRIPRProcessor(), WsfRIPRProcessor::WsfRIPRProcessor(), WsfRIPRProcessor::WsfRIPRProcessor(), WsfRIPRProcessor::WsfRIPRProcessor(), WsfScriptProcessor(), WsfScriptProcessor(), WsfScriptProcessor(), WsfScriptStateMachineProcessor::WsfScriptStateMachineProcessor(), WsfScriptStateMachineProcessor::WsfScriptStateMachineProcessor(), WsfTaskManager::WsfTaskManager(), WsfTaskProcessor::WsfTaskProcessor(), WsfTaskProcessor::WsfTaskProcessor(), WsfThreatProcessor::WsfThreatProcessor(), WsfTrackStateControllerProcessor::WsfTrackStateControllerProcessor(), WsfTrackStateControllerProcessor::WsfTrackStateControllerProcessor(), and ~WsfScriptProcessor().
|
protected |
The external recipients.
Referenced by GetExternalLinks(), WsfTrackProcessor::GetExternalLinks(), WsfPerceptionProcessor::HasExternalLinks(), WsfSA_Processor::HasExternalLinks(), Initialize(), WsfTrackProcessor::InitializeMemberData(), WsfMessageProcessor::Action::ProcessInput(), ProcessInput(), WsfMessageProcessor::SendMessage(), WsfSA_Processor::SendMessage(), SendMessage(), WsfPerceptionProcessor::SendStatus(), WsfScriptProcessor(), WsfScriptProcessor(), and WsfScriptProcessor().
|
protected |
Referenced by ExecuteOnMessageCreate(), WsfScriptProcessor(), WsfScriptProcessor(), and WsfScriptProcessor().
|
protected |
Pointer to the 'on_message' handler.
Referenced by GetMessageHandler(), Initialize(), ProcessInput(), WsfImageProcessor::ProcessMessage(), WsfMessageProcessor::ProcessMessage(), WsfPerceptionProcessor::ProcessMessage(), ProcessMessage(), WsfScriptStateMachineProcessor::ProcessMessage(), WsfTaskProcessor::ProcessMessage(), WsfScriptProcessor(), WsfScriptProcessor(), WsfScriptProcessor(), and ~WsfScriptProcessor().
|
protected |
Pointer to the 'on_message_create' script.
Referenced by ExecuteOnMessageCreate(), Initialize(), WsfScriptProcessor(), WsfScriptProcessor(), and WsfScriptProcessor().
|
protected |
|
protected |
|
protected |
'true' if the current message should be suppressed. This is set to 'false' before invoking the message handler for a received message. The user can invoke the script method 'SuppressMessage' to indicate that it will not be sent to the internal/external links.
Referenced by WsfImageProcessor::ProcessMessage(), WsfMessageProcessor::ProcessMessage(), ProcessMessage(), SuppressMessage(), WsfScriptProcessor(), WsfScriptProcessor(), and WsfScriptProcessor().