WSF
WsfSensor::ModeChangeEvent Class Reference

#include <WsfSensor.hpp>

Inheritance diagram for WsfSensor::ModeChangeEvent:
Collaboration diagram for WsfSensor::ModeChangeEvent:

Public Types

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

Public Member Functions

 ModeChangeEvent ()
 ModeChangeEvent (double aSimTime, EventType aEventType, WsfSensor *aSensorPtr, WsfStringId aModeNameId)
 Change mode event that changes a sensor's mode as an event.
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.

Detailed Description

This nested class 'ChangeMode' is necessary so that the data necessary for this event is separate from WsfSensorEvent.

Member Enumeration Documentation

◆ EventType

Enumerator
cSELECT 
cDESELECT 

Constructor & Destructor Documentation

◆ ModeChangeEvent() [1/2]

WsfSensor::ModeChangeEvent::ModeChangeEvent ( )

References cSELECT, and WsfEvent::WsfEvent().

◆ ModeChangeEvent() [2/2]

WsfSensor::ModeChangeEvent::ModeChangeEvent ( double aSimTime,
EventType aEventType,
WsfSensor * aSensorPtr,
WsfStringId aModeNameId )

Change mode event that changes a sensor's mode as an event.

References WsfEvent::WsfEvent(), and WsfSensor::WsfSensor().

Member Function Documentation

◆ Execute()

WsfEvent::EventDisposition WsfSensor::ModeChangeEvent::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, cDESELECT, cSELECT, WsfSimulation::GetPlatformByIndex(), WsfPlatformPart::GetSimulation(), WsfEvent::GetTime(), and platformPtr.


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