WSF
wsf::cyber::Engagement Class Reference

A class that represents the cyber engagements between two platforms. More...

#include <WsfCyberEngagement.hpp>

Inherits UtScriptAccessible.

Public Types

enum  CyberAttackFailure {
  cATTACK_RANDOM_DRAW , cATTACK_IMMUNITY , cATTACK_NOT_VULNERABLE , cATTACK_INSUFFICIENT_RESOURCES ,
  cATTACK_NONE
}
enum  CyberScanFailure { cSCAN_IMMUNITY , cSCAN_DETECTED , cSCAN_NOT_VULNERABLE , cSCAN_NONE }

Public Member Functions

 Engagement (std::string aAttackingPlatform, std::string aVictimPlatform, std::string aNamedAttack, WsfSimulation &aSimulation, size_t aKey)
 No default constructor usage - parameters required for instantiation.
virtual ~Engagement ()
 Engagement (const Engagement &aSrc)=delete
 Engagement (Engagement &&aSrc)=default
const Engagementoperator= (const Engagement &aRhs)=delete
const char * GetScriptClassName () const override

Public accessors for engagement data

const std::string & GetAttacker () const
size_t GetAttackerIndex () const
const std::string & GetVictim () const
size_t GetVictimIndex () const
const std::string & GetAttackType () const
size_t GetKey () const
AttackGetAttack () const
double GetDuration () const
double GetAttackStartTime () const
double GetAttackSuccessThreshold () const
double GetAttackDraw () const
double GetStatusReportThreshold () const
double GetStatusReportDraw () const
bool GetStatusReportSuccess () const
double GetTimeAttackDiscovered () const
double GetAttackDetectionThreshold () const
double GetAttackDetectionDraw () const
double GetAttackAttributionThreshold () const
double GetAttackAttributionDraw () const
double GetTimeAttackRecovery () const
bool GetRecovery () const
double GetScanStartTime () const
double GetScanDetectionThreshold () const
double GetScanDetectionDraw () const
double GetScanAttributionThreshold () const
double GetScanAttributionDraw () const
double GetScanDelayTime () const
double GetDeliveryDelayTime () const
bool GetScanSuccess () const
bool GetAttackInProgress () const
bool GetAttackSuccess () const
const std::vector< std::string > & GetAttackEffects () const
double GetAttackDetectionDelayTime () const
double GetAttackRecoveryDelayTime () const
double GetImmunityThreshold () const
double GetImmunityDraw () const
ProtectGetUsedProtection ()

Accessor methods for engagement failure status

CyberAttackFailure GetAttackFailureReason () const
CyberScanFailure GetScanFailureReason () const

Mutator methods for engagement failure status

Note
These can be set externally (namely by the engagement manager) to indicate why the engagement object has aborted processing/updating
void SetAttackFailureReason (CyberAttackFailure aAttackFailure)
void SetScanFailureReason (CyberScanFailure aScanFailure)

Mutators for engagement data that may be set during use

void SetAttackStartTime ()
void SetScanStartTime ()
void SetTimeAttackDiscovered ()
void SetTimeAttackRecovery ()
void SetScanSuccess (bool aSuccess)
void SetAttackInProgress (bool aInProgress)
void SetAttackSuccess (bool aSuccess)

Immunity Query Method

Provides a wrapper to query the cyber_protect object if it is currently immune to the provided named attack. This method is available here with the engagement object to allow for ease of access and to prevent other objects from accessing the cyber_protect directly

Note
Because this call queries the
bool IsVictimImmune () const

Draw Method

Asks the engagement object to generate a draw for the supplied probability type The values generated will be stored with the engagement object A boolean value is return to indicate if the threshold was met

bool Draw (random::ProbabilityType aProbabilityType)

Reset Method

Re-establishes original values on member variables in this object, with the exception of values that aid subsequent uses of the engagement object

virtual void Reset (bool aScanReset=false)

Release Attack Constraints Method

Releases all resources consumed by attacker after it has been destroyed.

void ReleaseAttackerConstraints ()

Meets Attacker Constraints

Ensures that enough resources are available to the attacker to allow for the named attack type.

bool MeetsAttackerConstraints ()

Make Constraint Reservations

If sufficient resources are available, the method reserves the resources required for a named attack type by removing the resources from those available and adding the attack type to any other concurrent attacks.

bool MakeConstraintReservations ()

Existing Constraint Reservations

Checks and returns whether any of the platform's cyber resource are reserved.

bool ExistingConstraintReservations ()
WsfSimulationGetSimulation () const

Detailed Description

A class that represents the cyber engagements between two platforms.

Member Enumeration Documentation

◆ CyberAttackFailure

Enumerator
cATTACK_RANDOM_DRAW 
cATTACK_IMMUNITY 
cATTACK_NOT_VULNERABLE 
cATTACK_INSUFFICIENT_RESOURCES 
cATTACK_NONE 

◆ CyberScanFailure

Enumerator
cSCAN_IMMUNITY 
cSCAN_DETECTED 
cSCAN_NOT_VULNERABLE 
cSCAN_NONE 

Constructor & Destructor Documentation

◆ Engagement() [1/3]

wsf::cyber::Engagement::Engagement ( std::string aAttackingPlatform,
std::string aVictimPlatform,
std::string aNamedAttack,
WsfSimulation & aSimulation,
size_t aKey )

No default constructor usage - parameters required for instantiation.

Referenced by Engagement(), Engagement(), and operator=().

◆ ~Engagement()

wsf::cyber::Engagement::~Engagement ( )
virtual

◆ Engagement() [2/3]

wsf::cyber::Engagement::Engagement ( const Engagement & aSrc)
delete

References Engagement().

◆ Engagement() [3/3]

wsf::cyber::Engagement::Engagement ( Engagement && aSrc)
default

References Engagement().

Member Function Documentation

◆ Draw()

bool wsf::cyber::Engagement::Draw ( random::ProbabilityType aProbabilityType)

This is a special case. The victim/target has become immune to this attack. Since multiple engagements exist, this data must be pushed back to the platform component cyber_protection object itself, so that if other engagements (from potentially other attackers against this target using the same attack) register the immunity when queried. NOTE: We cannot naively use the mProtectTypePtr to register the immunity. This may point to a "parent" cyber_protection, and not the component on the target itself

References wsf::cyber::random::cATTACK_ATTRIBUTION, wsf::cyber::random::cATTACK_DETECTION, wsf::cyber::random::cATTACK_SUCCESS, wsf::cyber::random::cFUTURE_IMMUNITY, wsf::cyber::random::cSCAN_ATTRIBUTION, wsf::cyber::random::cSCAN_DETECTION, wsf::cyber::random::cSTATUS_REPORT, wsf::cyber::SimulationExtension::Get(), WsfComponentList::GetComponent(), and wsf::cyber::SimulationExtension::GetCyberDrawManager().

◆ ExistingConstraintReservations()

bool wsf::cyber::Engagement::ExistingConstraintReservations ( )

◆ GetAttack()

Attack * wsf::cyber::Engagement::GetAttack ( ) const
inline

◆ GetAttackAttributionDraw()

double wsf::cyber::Engagement::GetAttackAttributionDraw ( ) const
inline

◆ GetAttackAttributionThreshold()

double wsf::cyber::Engagement::GetAttackAttributionThreshold ( ) const
inline

◆ GetAttackDetectionDelayTime()

double wsf::cyber::Engagement::GetAttackDetectionDelayTime ( ) const
inline

◆ GetAttackDetectionDraw()

double wsf::cyber::Engagement::GetAttackDetectionDraw ( ) const
inline

◆ GetAttackDetectionThreshold()

double wsf::cyber::Engagement::GetAttackDetectionThreshold ( ) const
inline

◆ GetAttackDraw()

double wsf::cyber::Engagement::GetAttackDraw ( ) const
inline

◆ GetAttackEffects()

const std::vector< std::string > & wsf::cyber::Engagement::GetAttackEffects ( ) const
inline

◆ GetAttacker()

const std::string & wsf::cyber::Engagement::GetAttacker ( ) const
inline

◆ GetAttackerIndex()

size_t wsf::cyber::Engagement::GetAttackerIndex ( ) const
inline

◆ GetAttackFailureReason()

CyberAttackFailure wsf::cyber::Engagement::GetAttackFailureReason ( ) const
inline

◆ GetAttackInProgress()

bool wsf::cyber::Engagement::GetAttackInProgress ( ) const
inline

◆ GetAttackRecoveryDelayTime()

double wsf::cyber::Engagement::GetAttackRecoveryDelayTime ( ) const
inline

◆ GetAttackStartTime()

double wsf::cyber::Engagement::GetAttackStartTime ( ) const
inline

◆ GetAttackSuccess()

bool wsf::cyber::Engagement::GetAttackSuccess ( ) const
inline

◆ GetAttackSuccessThreshold()

double wsf::cyber::Engagement::GetAttackSuccessThreshold ( ) const
inline

◆ GetAttackType()

◆ GetDeliveryDelayTime()

double wsf::cyber::Engagement::GetDeliveryDelayTime ( ) const
inline

◆ GetDuration()

double wsf::cyber::Engagement::GetDuration ( ) const
inline

◆ GetImmunityDraw()

double wsf::cyber::Engagement::GetImmunityDraw ( ) const
inline

◆ GetImmunityThreshold()

double wsf::cyber::Engagement::GetImmunityThreshold ( ) const
inline

◆ GetKey()

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

◆ GetRecovery()

bool wsf::cyber::Engagement::GetRecovery ( ) const
inline

◆ GetScanAttributionDraw()

double wsf::cyber::Engagement::GetScanAttributionDraw ( ) const
inline

◆ GetScanAttributionThreshold()

double wsf::cyber::Engagement::GetScanAttributionThreshold ( ) const
inline

◆ GetScanDelayTime()

double wsf::cyber::Engagement::GetScanDelayTime ( ) const
inline

◆ GetScanDetectionDraw()

double wsf::cyber::Engagement::GetScanDetectionDraw ( ) const
inline

◆ GetScanDetectionThreshold()

double wsf::cyber::Engagement::GetScanDetectionThreshold ( ) const
inline

◆ GetScanFailureReason()

CyberScanFailure wsf::cyber::Engagement::GetScanFailureReason ( ) const
inline

◆ GetScanStartTime()

double wsf::cyber::Engagement::GetScanStartTime ( ) const
inline

◆ GetScanSuccess()

bool wsf::cyber::Engagement::GetScanSuccess ( ) const
inline

◆ GetScriptClassName()

const char * wsf::cyber::Engagement::GetScriptClassName ( ) const
inlineoverride

◆ GetSimulation()

◆ GetStatusReportDraw()

double wsf::cyber::Engagement::GetStatusReportDraw ( ) const
inline

◆ GetStatusReportSuccess()

bool wsf::cyber::Engagement::GetStatusReportSuccess ( ) const

Returns true if the attack status has been reported. Returns false if it failed to be reported or hasn't yet been reported.

Referenced by wsf::cyber::VisualizationDraw::AttackFailed(), wsf::cyber::VisualizationDraw::AttackSucceeded(), wsf::event::utils::GetAttackReportStatus(), wsf::cyber::VisualizationDraw::ScanFailed(), and wsf::cyber::VisualizationDraw::ScanSucceeded().

◆ GetStatusReportThreshold()

double wsf::cyber::Engagement::GetStatusReportThreshold ( ) const
inline

◆ GetTimeAttackDiscovered()

double wsf::cyber::Engagement::GetTimeAttackDiscovered ( ) const
inline

◆ GetTimeAttackRecovery()

double wsf::cyber::Engagement::GetTimeAttackRecovery ( ) const
inline

◆ GetUsedProtection()

Protect * wsf::cyber::Engagement::GetUsedProtection ( )
inline

We provide a pointer to the protection used, as in some cases, the protection on the platform is not the valid protection object.

◆ GetVictim()

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

◆ GetVictimIndex()

size_t wsf::cyber::Engagement::GetVictimIndex ( ) const
inline

◆ IsVictimImmune()

bool wsf::cyber::Engagement::IsVictimImmune ( ) const

◆ MakeConstraintReservations()

bool wsf::cyber::Engagement::MakeConstraintReservations ( )

◆ MeetsAttackerConstraints()

bool wsf::cyber::Engagement::MeetsAttackerConstraints ( )

◆ operator=()

const Engagement & wsf::cyber::Engagement::operator= ( const Engagement & aRhs)
delete

References Engagement().

◆ ReleaseAttackerConstraints()

void wsf::cyber::Engagement::ReleaseAttackerConstraints ( )

References _unused, and wsf::cyber::Constraint::Find().

Referenced by ~Engagement().

◆ Reset()

void wsf::cyber::Engagement::Reset ( bool aScanReset = false)
virtual

◆ SetAttackFailureReason()

void wsf::cyber::Engagement::SetAttackFailureReason ( CyberAttackFailure aAttackFailure)
inline

◆ SetAttackInProgress()

void wsf::cyber::Engagement::SetAttackInProgress ( bool aInProgress)
inline

◆ SetAttackStartTime()

void wsf::cyber::Engagement::SetAttackStartTime ( )

◆ SetAttackSuccess()

void wsf::cyber::Engagement::SetAttackSuccess ( bool aSuccess)
inline

◆ SetScanFailureReason()

void wsf::cyber::Engagement::SetScanFailureReason ( CyberScanFailure aScanFailure)
inline

◆ SetScanStartTime()

void wsf::cyber::Engagement::SetScanStartTime ( )

◆ SetScanSuccess()

void wsf::cyber::Engagement::SetScanSuccess ( bool aSuccess)
inline

◆ SetTimeAttackDiscovered()

void wsf::cyber::Engagement::SetTimeAttackDiscovered ( )

◆ SetTimeAttackRecovery()

void wsf::cyber::Engagement::SetTimeAttackRecovery ( )

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