WSF
WsfScriptEvent Class Reference

An event scheduled to execute a script on a given platform or processor. More...

#include <WsfScriptEvent.hpp>

Inheritance diagram for WsfScriptEvent:
Collaboration diagram for WsfScriptEvent:

Public Member Functions

 WsfScriptEvent ()=default
 WsfScriptEvent (double aSimTime, WsfPlatform *aPlatformPtr, WsfStringId aScriptName, const UtScriptDataList &aScriptArgs)
 WsfScriptEvent (double aSimTime, WsfScriptProcessor *aProcessorPtr, WsfStringId aScriptName, const UtScriptDataList &aScriptArgs)
 WsfScriptEvent (double aSimTime, WsfSimulation *aSimulationPtr, WsfStringId aScriptName, const UtScriptDataList &aScriptArgs)
 Create an event to run a script at a specified in the simulation context.
EventDisposition Execute () override
Public Member Functions inherited from WsfEvent
 WsfEvent ()=default
 WsfEvent (double aSimTime, int aPriority=0)
 WsfEvent (const WsfEvent &aSrc)=delete
 Copy constructor and copy assignment deleted to prevent copying.
WsfEventoperator= (const WsfEvent &aRhs)=delete
virtual ~WsfEvent ()=default
double GetTime () const
int GetPriority () const
bool ShouldExecute () const
void SetTime (double aSimTime)
void SetPriority (int aPriority)
void SetShouldExecute (bool aExecute)
WsfSimulationGetSimulation () const
void AddedToEventQueue (WsfSimulation &aSimulation)
 Called when the event is added to the event queue of the specified simulation.

Additional Inherited Members

Public Types inherited from WsfEvent
enum  EventDisposition { cDELETE , cRESCHEDULE }

Detailed Description

An event scheduled to execute a script on a given platform or processor.

Constructor & Destructor Documentation

◆ WsfScriptEvent() [1/4]

WsfScriptEvent::WsfScriptEvent ( )
default

References WsfScriptEvent().

Referenced by WsfScriptEvent().

◆ WsfScriptEvent() [2/4]

WsfScriptEvent::WsfScriptEvent ( double aSimTime,
WsfPlatform * aPlatformPtr,
WsfStringId aScriptName,
const UtScriptDataList & aScriptArgs )

Create an event to run a script at a specified time from a specified platform context.

Parameters
aSimTimeThe simulation time when the script is to be executed.
aPlatformPtrThe platform containing the context containing the script to execute.
aScriptNameThe name (ID) of the script to execute.
aScriptArgsThe script arguments.

References WsfSimulation::GetSimTime(), WsfPlatform::GetSimulation(), WsfEvent::SetTime(), simTime, and WsfEvent::WsfEvent().

◆ WsfScriptEvent() [3/4]

WsfScriptEvent::WsfScriptEvent ( double aSimTime,
WsfScriptProcessor * aProcessorPtr,
WsfStringId aScriptName,
const UtScriptDataList & aScriptArgs )

Create an event to run a script at a specified time from a specified processor context.

Parameters
aSimTimeThe simulation time when the script is to be executed.
aProcessorPtrThe platform containing the context containing the script to execute.
aScriptNameThe name (ID) of the script to execute.
aScriptArgsThe script arguments.

References WsfSimulation::GetSimTime(), WsfPlatformPart::GetSimulation(), WsfEvent::SetTime(), simTime, and WsfEvent::WsfEvent().

◆ WsfScriptEvent() [4/4]

WsfScriptEvent::WsfScriptEvent ( double aSimTime,
WsfSimulation * aSimulationPtr,
WsfStringId aScriptName,
const UtScriptDataList & aScriptArgs )

Create an event to run a script at a specified in the simulation context.

References WsfSimulation::GetSimTime(), WsfEvent::SetTime(), simTime, and WsfEvent::WsfEvent().

Member Function Documentation

◆ Execute()

WsfEvent::EventDisposition WsfScriptEvent::Execute ( )
overridevirtual

Execute the specified event.

Returns
The disposition of the event. This indicates to the event manager what should be done with the event. If cRESCHEDULE then Execute should have called SetTime to set the time for which the event manager should reschedule the event.

Implements WsfEvent.

References WsfEvent::cDELETE, WsfScriptContext::ExecuteScript(), WsfScriptProcessor::ExecuteScript(), WsfSimulation::GetPlatformByIndex(), WsfSimulation::GetScriptContext(), WsfEvent::GetSimulation(), WsfEvent::GetTime(), and platformPtr.


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