WSF
wsf::cyber::Event Class Reference

#include <WsfCyberEvent.hpp>

Inheritance diagram for wsf::cyber::Event:
Collaboration diagram for wsf::cyber::Event:

Public Types

enum class  Type : int {
  cSCAN_DELAY , cATTACK_DELAY , cATTACK_DETECTION_DELAY , cATTACK_RECOVERY_DELAY ,
  cOTHER , cNONE
}
Public Types inherited from WsfEvent
enum  EventDisposition { cDELETE , cRESCHEDULE }

Public Member Functions

 Event (double aSimTime, Type aEventType, std::string aVictim, size_t aKey)
 ~Event () override=default
EventDisposition Execute () override
Type GetType () const
const std::string & GetVictim () const
size_t GetKey () const
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

An event associated with cyber. These typically involve scheduled time delays to provide a high level, generic simulation of specific operations involved in cyber warfare that are not specifically modeled.

Member Enumeration Documentation

◆ Type

enum class wsf::cyber::Event::Type : int
strong
Enumerator
cSCAN_DELAY 
cATTACK_DELAY 
cATTACK_DETECTION_DELAY 
cATTACK_RECOVERY_DELAY 
cOTHER 
cNONE 

Constructor & Destructor Documentation

◆ Event()

wsf::cyber::Event::Event ( double aSimTime,
Type aEventType,
std::string aVictim,
size_t aKey )

References WsfEvent::WsfEvent().

◆ ~Event()

wsf::cyber::Event::~Event ( )
overridedefault

References Execute().

Member Function Documentation

◆ Execute()

Event::EventDisposition wsf::cyber::Event::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.

Check if the target platform still exists in the simulation, since we've delayed.

Do a check for the engagement object to ensure it hasn't been removed since event scheduling

Implements WsfEvent.

References cATTACK_DELAY, cATTACK_DETECTION_DELAY, cATTACK_RECOVERY_DELAY, WsfEvent::cDELETE, cSCAN_DELAY, wsf::cyber::EventManager::EndEvent(), wsf::cyber::EngagementManager::Get(), wsf::cyber::SimulationExtension::Get(), wsf::cyber::SimulationExtension::GetCyberEventManager(), and WsfEvent::GetSimulation().

Referenced by ~Event().

◆ GetKey()

size_t wsf::cyber::Event::GetKey ( ) const
inline

◆ GetType()

Type wsf::cyber::Event::GetType ( ) const
inline

◆ GetVictim()

const std::string & wsf::cyber::Event::GetVictim ( ) const
inline

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