WSF
wsf::cyber::Attack Class Reference

#include <WsfCyberAttack.hpp>

Inheritance diagram for wsf::cyber::Attack:
Collaboration diagram for wsf::cyber::Attack:

Public Member Functions

 Attack ()=default
 ~Attack () override=default
 Attack (const Attack &aSrc)=default
Attackoperator= (const Attack &aRhs)=default
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 TypeListGetTypeList () const
bool IsA_TypeOf (WsfStringId aType) const
WsfObjectoperator= (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)

Common infrastructure methods.

AttackClone () const override
bool ProcessInput (UtInput &aInput) override
virtual bool Initialize (double aSimTime, WsfSimulation &aSimulation)

Accessors for the default probabilities.

double GetProbabilityOfScanDetection () const
double GetProbabilityOfScanAttribution () const
double GetProbabilityOfAttackSuccess () const
double GetProbabilityOfStatusReport () const
double GetProbabilityOfAttackDetection () const
double GetProbabilityOfAttackAttribution () const
double GetProbabilityOfFutureImmunity () const

Accessors for the probability frequencies.

random::ProbabilityFrequency GetFrequencyOfScanDetection () const
random::ProbabilityFrequency GetFrequencyOfScanAttribution () const
random::ProbabilityFrequency GetFrequencyOfAttackSuccess () const
random::ProbabilityFrequency GetFrequencyOfStatusReport () const
random::ProbabilityFrequency GetFrequencyOfAttackDetection () const
random::ProbabilityFrequency GetFrequencyOfAttackAttribution () const
random::ProbabilityFrequency GetFrequencyOfFutureImmunity () const

Accessors for the random time intervals.

WsfRandomVariableGetRandomVariableScanDetection ()
WsfRandomVariableGetRandomVariableScanAttribution ()
WsfRandomVariableGetRandomVariableAttackSuccess ()
WsfRandomVariableGetRandomVariableStatusReport ()
WsfRandomVariableGetRandomVariableAttackDetection ()
WsfRandomVariableGetRandomVariableAttackAttribution ()
WsfRandomVariableGetRandomVariableFutureImmunity ()

Accessors for attack duration requirements.

double GetDuration () const
double GetResourceRequirements () const

Accessors for the time delays.

double GetTimeDelayScan () const
double GetTimeDelayDelivery () const

Accessor the time delays, with a draw for a new value.

double GetLastTimeDelayScan () const
double GetLastTimeDelayDelivery () const

Accessor for effect types for this attack

const std::vector< std::string > & GetEffects () const

ExtendedDrawDefinition

Provides a user implemented draw value determination method for ProbabilityFrequency::cOTHER case. This is resolved in wsf::cyber::Random, as determination of a whether or not a draw needs to occur is cached and stored via that object. Access to that functionality is not public, so this provides a hook that is referred during processing to allow a user to define their own.

virtual double ExtendedDrawDefinition (const std::string &aTarget={})
virtual void ProcessFrequencyInput (WsfRandomVariable &aRandomVariable, random::ProbabilityFrequency &aFrequency, UtInput &aInput)

Additional Inherited Members

Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).

Detailed Description

A class that defines the effect types that make up a cyber attack.

A 'cyber attack' is composed of one or more 'cyber effects' that define what the attack does to the victim. In many cases an attack has only one effect, but this makes it possible to define an attack that is composed of several simple pre-defined effects.

Note
'cyber_attack' types are defined in the type list and from then are read-only. At run-time the attacker will mention this attack by name and WsfCyberProtect will locate the object and get the data it needs.

Constructor & Destructor Documentation

◆ Attack() [1/2]

wsf::cyber::Attack::Attack ( )
default

Referenced by Attack(), Clone(), and operator=().

◆ ~Attack()

wsf::cyber::Attack::~Attack ( )
overridedefault

◆ Attack() [2/2]

wsf::cyber::Attack::Attack ( const Attack & aSrc)
default

References Attack().

Member Function Documentation

◆ Clone()

Attack * wsf::cyber::Attack::Clone ( ) const
overridevirtual

Return a copy of this object. Must be implemented by all derived types. If cloning is impossible, a WsfUncloneableException should be thrown.

Implements WsfObject.

References Attack().

Referenced by operator=().

◆ ExtendedDrawDefinition()

double wsf::cyber::Attack::ExtendedDrawDefinition ( const std::string & aTarget = {})
virtual

◆ GetDuration()

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

◆ GetEffects()

const std::vector< std::string > & wsf::cyber::Attack::GetEffects ( ) const
inline

◆ GetFrequencyOfAttackAttribution()

random::ProbabilityFrequency wsf::cyber::Attack::GetFrequencyOfAttackAttribution ( ) const
inline

◆ GetFrequencyOfAttackDetection()

random::ProbabilityFrequency wsf::cyber::Attack::GetFrequencyOfAttackDetection ( ) const
inline

◆ GetFrequencyOfAttackSuccess()

random::ProbabilityFrequency wsf::cyber::Attack::GetFrequencyOfAttackSuccess ( ) const
inline

◆ GetFrequencyOfFutureImmunity()

random::ProbabilityFrequency wsf::cyber::Attack::GetFrequencyOfFutureImmunity ( ) const
inline

◆ GetFrequencyOfScanAttribution()

random::ProbabilityFrequency wsf::cyber::Attack::GetFrequencyOfScanAttribution ( ) const
inline

◆ GetFrequencyOfScanDetection()

random::ProbabilityFrequency wsf::cyber::Attack::GetFrequencyOfScanDetection ( ) const
inline

◆ GetFrequencyOfStatusReport()

random::ProbabilityFrequency wsf::cyber::Attack::GetFrequencyOfStatusReport ( ) const
inline

◆ GetLastTimeDelayDelivery()

double wsf::cyber::Attack::GetLastTimeDelayDelivery ( ) const
inline

◆ GetLastTimeDelayScan()

double wsf::cyber::Attack::GetLastTimeDelayScan ( ) const
inline

◆ GetProbabilityOfAttackAttribution()

double wsf::cyber::Attack::GetProbabilityOfAttackAttribution ( ) const
inline

◆ GetProbabilityOfAttackDetection()

double wsf::cyber::Attack::GetProbabilityOfAttackDetection ( ) const
inline

◆ GetProbabilityOfAttackSuccess()

double wsf::cyber::Attack::GetProbabilityOfAttackSuccess ( ) const
inline

◆ GetProbabilityOfFutureImmunity()

double wsf::cyber::Attack::GetProbabilityOfFutureImmunity ( ) const
inline

◆ GetProbabilityOfScanAttribution()

double wsf::cyber::Attack::GetProbabilityOfScanAttribution ( ) const
inline

◆ GetProbabilityOfScanDetection()

double wsf::cyber::Attack::GetProbabilityOfScanDetection ( ) const
inline

◆ GetProbabilityOfStatusReport()

double wsf::cyber::Attack::GetProbabilityOfStatusReport ( ) const
inline

◆ GetRandomVariableAttackAttribution()

WsfRandomVariable & wsf::cyber::Attack::GetRandomVariableAttackAttribution ( )
inline

◆ GetRandomVariableAttackDetection()

WsfRandomVariable & wsf::cyber::Attack::GetRandomVariableAttackDetection ( )
inline

◆ GetRandomVariableAttackSuccess()

WsfRandomVariable & wsf::cyber::Attack::GetRandomVariableAttackSuccess ( )
inline

◆ GetRandomVariableFutureImmunity()

WsfRandomVariable & wsf::cyber::Attack::GetRandomVariableFutureImmunity ( )
inline

◆ GetRandomVariableScanAttribution()

WsfRandomVariable & wsf::cyber::Attack::GetRandomVariableScanAttribution ( )
inline

◆ GetRandomVariableScanDetection()

WsfRandomVariable & wsf::cyber::Attack::GetRandomVariableScanDetection ( )
inline

◆ GetRandomVariableStatusReport()

WsfRandomVariable & wsf::cyber::Attack::GetRandomVariableStatusReport ( )
inline

◆ GetResourceRequirements()

double wsf::cyber::Attack::GetResourceRequirements ( ) const
inline

◆ GetTimeDelayDelivery()

double wsf::cyber::Attack::GetTimeDelayDelivery ( ) const
inline

◆ GetTimeDelayScan()

double wsf::cyber::Attack::GetTimeDelayScan ( ) const
inline

◆ Initialize()

bool wsf::cyber::Attack::Initialize ( double aSimTime,
WsfSimulation & aSimulation )
virtual

◆ operator=()

Attack & wsf::cyber::Attack::operator= ( const Attack & aRhs)
default

◆ ProcessFrequencyInput()

void wsf::cyber::Attack::ProcessFrequencyInput ( WsfRandomVariable & aRandomVariable,
random::ProbabilityFrequency & aFrequency,
UtInput & aInput )
protectedvirtual

Utility method for code reuse when parsing frequency input. Virtual to allow user redefinition to support input parsing of the cOTHER frequency. Within the base implementation, usage of cOTHER will throw an exception.

References wsf::cyber::random::cINTERVAL_PER_SIMULATION, wsf::cyber::random::cINTERVAL_PER_TARGET, wsf::cyber::random::cOTHER, and WsfRandomVariable::ProcessInput().

Referenced by ProcessInput().

◆ ProcessInput()

bool wsf::cyber::Attack::ProcessInput ( UtInput & aInput)
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'.

Parameters
aInputa reference to a UtInput object.
Returns
'true' if the command was one recognized by the class or 'false' if not.
Exceptions
UtInput::ExceptionBase(or an object derived from it) if the command was recognized but contains some sort of error.
Note
If a derived class does not recognize the command (i.e.: the return value is false) then it should call the base class ProcessInput method. This chain should continue until either the command is recognized or the top-level base class is encountered.

We should check that associated effect types for this attack exist before continuing, but cannot do so due to the lack of accessibility to the scenario object at this point. Effects will need to be validated prior to use.

Reimplemented from WsfObject.

References ProcessFrequencyInput(), and WsfObject::ProcessInput().

Referenced by operator=().


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