12#ifndef WSFCYBERPROTECT_HPP
13#define WSFCYBERPROTECT_HPP
15#include "wsf_cyber_export.h"
21#include "UtScriptContext.hpp"
60 Protect* Clone()
const override;
61 bool Initialize(
double aSimTime)
override;
62 bool ProcessInput(UtInput& aInput)
override;
72 bool ProtectionExists(
const std::string& aAttackName)
const;
76 double GetProbabilityOfScanDetection(
const std::string& aAttackName)
const;
77 double GetProbabilityOfScanAttribution(
const std::string& aAttackName)
const;
78 double GetProbabilityOfAttackSuccess(
const std::string& aAttackName)
const;
79 double GetProbabilityOfStatusReport(
const std::string& aAttackName)
const;
80 double GetProbabilityOfAttackDetection(
const std::string& aAttackName)
const;
81 double GetProbabilityOfAttackAttribution(
const std::string& aAttackName)
const;
82 double GetProbabilityOfFutureImmunity(
const std::string& aAttackName)
const;
83 double DetectionDelayTime(
const std::string& aAttackName)
const;
84 double RecoveryDelayTime(
const std::string& aAttackName)
const;
85 double LastDetectionDelayTime(
const std::string& aAttackName)
const;
86 double LastRecoveryDelayTime(
const std::string& aAttackName)
const;
87 bool DoRestore(
const std::string& aAttackName)
const;
88 bool IsImmune(
const std::string& aAttackName)
const;
93 void ExecuteOnAttackDetection(
Engagement& aEngagement,
double aSimTime);
94 void ExecuteOnAttackRecovery(
Engagement& aEngagement,
double aSimTime);
95 void ExecuteOnScanDetection(
Engagement& aEngagement,
double aSimTime);
96 bool ExecuteIsVulnerable(
Engagement& aEngagement,
double aSimTime,
bool& aWasRun);
101 void SetImmune(
const std::string& aNamedAttack) { mImmuneAttacks.push_back(aNamedAttack); }
163 bool mDefaultDefined;
167 std::vector<std::string> mImmuneAttacks;
170 UtScriptClass* mEngagementClassPtr;
#define WSF_DECLARE_COMPONENT_ROLE_TYPE(TYPE, ROLE)
Definition WsfComponentRoles.hpp:44
@ cWSF_COMPONENT_CYBER_PROTECT
'cyber_protect' platform extension.
Definition WsfCyberComponentRoles.hpp:18
WsfSimpleComponentT< WsfPlatformComponent > WsfSimplePlatformComponent
Definition WsfSimpleComponent.hpp:126
Definition WsfComponent.hpp:39
WsfNamed()
Definition WsfNamed.cpp:17
WsfObject()
This is the constructor for the WsfObject class.
Definition WsfObject.cpp:88
Definition WsfRandomVariable.hpp:33
@ cCONSTANT
The random values will always have a constant value.
Definition WsfRandomVariable.hpp:38
@ cNON_NEGATIVE
Value must be greater than or equal to zero.
Definition WsfRandomVariable.hpp:50
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Definition WsfScriptContext.hpp:71
int mRoles[2]
Definition WsfSimpleComponent.hpp:116
A class that represents the cyber engagements between two platforms.
Definition WsfCyberEngagement.hpp:37
Definition WsfCyberProtect.hpp:114
UtScript * mIsVulnerable
Definition WsfCyberProtect.hpp:138
bool mRestore
Definition WsfCyberProtect.hpp:133
double mAttackSuccess
Definition WsfCyberProtect.hpp:124
UtScript * mOnAttackRecovery
Definition WsfCyberProtect.hpp:136
double mAttackDetection
Definition WsfCyberProtect.hpp:126
double mStatusReport
Definition WsfCyberProtect.hpp:125
double mAttackAttribution
Definition WsfCyberProtect.hpp:127
bool ProcessInput(UtInput &aInput, WsfScriptContext &aContext)
Definition WsfCyberProtect.cpp:162
double mImmunity
Definition WsfCyberProtect.hpp:128
UtScript * mOnScanDetection
Definition WsfCyberProtect.hpp:137
WsfRandomVariable mDetectionDelay
Definition WsfCyberProtect.hpp:130
~ProtectedAttack() override=default
double mScanAttribution
Definition WsfCyberProtect.hpp:123
WsfRandomVariable mRecoveryDelay
Definition WsfCyberProtect.hpp:131
double mScanDetection
Definition WsfCyberProtect.hpp:122
UtScript * mOnAttackDetection
Definition WsfCyberProtect.hpp:135
Definition WsfCyberProtect.hpp:40
std::vector< ProtectedAttack > ProtectedAttackList
Definition WsfCyberProtect.hpp:143
std::vector< ProtectedAttack >::iterator ProtectedAttackListNonConstIt
Definition WsfCyberProtect.hpp:145
bool DefaultExists() const
Definition WsfCyberProtect.hpp:67
WsfComponent * CloneComponent() const override
Definition WsfCyberProtect.hpp:53
void SetImmune(const std::string &aNamedAttack)
Definition WsfCyberProtect.hpp:101
Protect(WsfScenario &aScenario)
Definition WsfCyberProtect.cpp:81
Protect & operator=(const Protect &aRhs)=delete
Assignment operator deleted to prevent use.
WsfScriptContext & GetScriptContext()
Definition WsfCyberProtect.hpp:103
UtScriptContext * GetScriptAccessibleContext() const override
Definition WsfCyberProtect.hpp:104
std::vector< ProtectedAttack >::const_iterator ProtectedAttackListIt
Definition WsfCyberProtect.hpp:144
~Protect() override=default
static Protect * Find(const WsfPlatform &aPlatform)
Definition WsfCyberProtect.cpp:67
Protect * Clone() const override
Definition WsfCyberProtect.cpp:110
void * QueryInterface(int aRole) override
Definition WsfCyberProtect.hpp:54
void ComponentParentChanged(WsfPlatform *aPlatformPtr) override
Definition WsfCyberProtect.hpp:55
static void RegisterComponentFactory(WsfScenario &aScenario)
Definition WsfCyberProtect.cpp:74
Definition WsfCyberApplicationExtension.cpp:24
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32