|
WSF
|
#include <WsfCyberProtect.hpp>


Classes | |
| class | ProtectedAttack |
Public Member Functions | |
| Protect (WsfScenario &aScenario) | |
| ~Protect () override=default | |
| Protect & | operator= (const Protect &aRhs)=delete |
| Assignment operator deleted to prevent use. | |
| 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 TypeList & | GetTypeList () const |
| bool | IsA_TypeOf (WsfStringId aType) const |
| WsfObject & | operator= (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) |
| Public Member Functions inherited from WsfSimpleComponentT< WsfPlatformComponent > | |
| WsfSimpleComponentT ()=default | |
| Empty constructor for serialization. | |
| WsfSimpleComponentT (int aRole, WsfStringId aName) | |
| WsfSimpleComponentT (int aRole) | |
| WsfSimpleComponentT (WsfStringId aName) | |
| WsfSimpleComponentT (const WsfSimpleComponentT &aSrc) | |
| WsfSimpleComponentT & | operator= (const WsfSimpleComponentT &aRhs) |
| ~WsfSimpleComponentT () override=default | |
| WsfStringId | GetComponentName () const override |
| const int * | GetComponentRoles () const override |
| Public Member Functions inherited from WsfComponentT< WsfPlatform > | |
| WsfComponentT () | |
| WsfComponentT (const WsfComponentT &) noexcept | |
| WsfComponentT & | operator= (const WsfComponentT &) noexcept |
| ~WsfComponentT () override=default | |
| ParentType * | GetComponentParent () const |
| void | SetComponentParent (ParentType *aParentPtr) |
| Public Member Functions inherited from WsfComponent | |
| virtual | ~WsfComponent ()=default |
| virtual int | GetComponentInitializationOrder () const |
| template<typename T> | |
| bool | QueryInterfaceT (T *&aRolePtr) |
| bool | ComponentHasRole (int aRole) |
| Returns true if the component has the specified role. | |
| virtual bool | PreInitialize (double aSimTime) |
| virtual bool | Initialize2 (double aSimTime) |
| virtual void | PreInput () |
| Public Member Functions inherited from WsfNamed | |
| WsfNamed () | |
| WsfNamed (WsfStringId aName) | |
| WsfNamed (const WsfNamed &)=default | |
| WsfNamed & | operator= (const WsfNamed &)=default |
| virtual | ~WsfNamed ()=default |
| const std::string & | GetName () const |
| WsfStringId | GetNameId () const |
| void | SetName (WsfStringId aName) |
Static Public Member Functions | |
| static Protect * | Find (const WsfPlatform &aPlatform) |
| static void | RegisterComponentFactory (WsfScenario &aScenario) |
Definitions to support internal ProtectedAttack container usage | |
| using | ProtectedAttackList = std::vector<ProtectedAttack> |
| using | ProtectedAttackListIt = std::vector<ProtectedAttack>::const_iterator |
| using | ProtectedAttackListNonConstIt = std::vector<ProtectedAttack>::iterator |
Component infrastructure methods | |
| WsfComponent * | CloneComponent () const override |
| void * | QueryInterface (int aRole) override |
| void | ComponentParentChanged (WsfPlatform *aPlatformPtr) override |
Common infrastructure methods. | |
| Protect * | Clone () const override |
| bool | Initialize (double aSimTime) override |
| bool | ProcessInput (UtInput &aInput) override |
DefaultExists method | |
Returns true if the cyber protect object has a default defined | |
| bool | DefaultExists () const |
ProtectionExists method | |
Returns true if a specific named attack provided in the argument has a corresponding protection entry in the object | |
| bool | ProtectionExists (const std::string &aAttackName) const |
Cyber Protect query/inspection methods | |
| double | GetProbabilityOfScanDetection (const std::string &aAttackName) const |
| double | GetProbabilityOfScanAttribution (const std::string &aAttackName) const |
| double | GetProbabilityOfAttackSuccess (const std::string &aAttackName) const |
| double | GetProbabilityOfStatusReport (const std::string &aAttackName) const |
| double | GetProbabilityOfAttackDetection (const std::string &aAttackName) const |
| double | GetProbabilityOfAttackAttribution (const std::string &aAttackName) const |
| double | GetProbabilityOfFutureImmunity (const std::string &aAttackName) const |
| double | DetectionDelayTime (const std::string &aAttackName) const |
| double | RecoveryDelayTime (const std::string &aAttackName) const |
| double | LastDetectionDelayTime (const std::string &aAttackName) const |
| double | LastRecoveryDelayTime (const std::string &aAttackName) const |
| bool | DoRestore (const std::string &aAttackName) const |
| bool | IsImmune (const std::string &aAttackName) const |
User-defined script method execution | |
| void | ExecuteOnAttackDetection (Engagement &aEngagement, double aSimTime) |
| void | ExecuteOnAttackRecovery (Engagement &aEngagement, double aSimTime) |
| void | ExecuteOnScanDetection (Engagement &aEngagement, double aSimTime) |
| bool | ExecuteIsVulnerable (Engagement &aEngagement, double aSimTime, bool &aWasRun) |
Immunity Mutator | |
Set the immunity for this component | |
| void | SetImmune (const std::string &aNamedAttack) |
| WsfScriptContext & | GetScriptContext () |
| UtScriptContext * | GetScriptAccessibleContext () const override |
| Protect (const Protect &aSrc) | |
Additional Inherited Members | |
| Public Types inherited from WsfObject | |
| typedef std::vector< WsfStringId > | TypeList |
| The list of types returned by GetTypeList. | |
| Public Types inherited from WsfComponentT< WsfPlatform > | |
| typedef WsfPlatform | ParentType |
| This is needed to support the WsfComponentList template. | |
| WsfObject (const WsfObject &aSrc) | |
| Copy constructor (for Clone()). | |
| int | mRoles [2] |
Platform component for cyber warfare.
This defines a platform component that implements the modeling of cyber warfare against the platform.
|
protected |
|
protected |
|
protected |
| wsf::cyber::Protect::Protect | ( | WsfScenario & | aScenario | ) |
References GetScriptContext(), Protect(), and WsfObject::WsfObject().
Referenced by Clone(), Find(), operator=(), Protect(), and Protect().
|
overridedefault |
|
protected |
References Protect(), and WsfObject::WsfObject().
|
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 Protect().
Referenced by CloneComponent().
|
inlineoverridevirtual |
Clones a component. May return null if component does not support clone.
Implements WsfComponent.
References Clone().
|
inlineoverridevirtual |
The parent to which the component is attached has been updated. This virtual method is called whenever the components parent attachment has been changed. This is provided so derived class receives notification of the change.
| aParentPtr | Pointer to the new parent. The new parent may be null if the attachment was severed. |
Reimplemented from WsfComponentT< WsfPlatform >.
|
inline |
| double wsf::cyber::Protect::DetectionDelayTime | ( | const std::string & | aAttackName | ) | const |
| bool wsf::cyber::Protect::DoRestore | ( | const std::string & | aAttackName | ) | const |
| bool wsf::cyber::Protect::ExecuteIsVulnerable | ( | Engagement & | aEngagement, |
| double | aSimTime, | ||
| bool & | aWasRun ) |
References wsf::cyber::Engagement::GetAttackType().
Referenced by wsf::cyber::EngagementManager::CyberAttack().
| void wsf::cyber::Protect::ExecuteOnAttackDetection | ( | Engagement & | aEngagement, |
| double | aSimTime ) |
References wsf::cyber::Engagement::GetAttackType().
Referenced by wsf::cyber::EngagementManager::CyberAttackDetectionDelay().
| void wsf::cyber::Protect::ExecuteOnAttackRecovery | ( | Engagement & | aEngagement, |
| double | aSimTime ) |
References wsf::cyber::Engagement::GetAttackType().
| void wsf::cyber::Protect::ExecuteOnScanDetection | ( | Engagement & | aEngagement, |
| double | aSimTime ) |
References wsf::cyber::Engagement::GetAttackType().
|
static |
References WsfComponentListT< COMPONENT_TYPE >::FindComponentByRole(), and Protect().
| double wsf::cyber::Protect::GetProbabilityOfAttackAttribution | ( | const std::string & | aAttackName | ) | const |
| double wsf::cyber::Protect::GetProbabilityOfAttackDetection | ( | const std::string & | aAttackName | ) | const |
| double wsf::cyber::Protect::GetProbabilityOfAttackSuccess | ( | const std::string & | aAttackName | ) | const |
| double wsf::cyber::Protect::GetProbabilityOfFutureImmunity | ( | const std::string & | aAttackName | ) | const |
| double wsf::cyber::Protect::GetProbabilityOfScanAttribution | ( | const std::string & | aAttackName | ) | const |
| double wsf::cyber::Protect::GetProbabilityOfScanDetection | ( | const std::string & | aAttackName | ) | const |
| double wsf::cyber::Protect::GetProbabilityOfStatusReport | ( | const std::string & | aAttackName | ) | const |
|
inlineoverride |
|
inline |
Referenced by Protect().
|
overridevirtual |
Perform phase 1 initialization. This is called by WsfPlatform::Initialize() during phase 1 initialization of the platform. The component should complete validation of input data that could not be done by ProcessInput, as well as any other functions to prepare for simulation use (subject to the next paragraph).
The order in which components are initialized is defined by GetComponentInitializationOrder. In general a component implementation of this method should not be dependent on the state of another component, i.e.: it should not assume that the other components Initialize() method has been called. If such a dependency exists one should use Initialize2() if possible, or specify a value GetComponentInitializationOrder to force things to initialize in a particular order.
| aSimTime | The current simulation time. |
Reimplemented from WsfComponent.
References ok.
| bool wsf::cyber::Protect::IsImmune | ( | const std::string & | aAttackName | ) | const |
| double wsf::cyber::Protect::LastDetectionDelayTime | ( | const std::string & | aAttackName | ) | const |
| double wsf::cyber::Protect::LastRecoveryDelayTime | ( | const std::string & | aAttackName | ) | const |
Assignment operator deleted to prevent use.
References Protect().
|
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'.
| aInput | a reference to a UtInput object. |
| UtInput::ExceptionBase | (or an object derived from it) if the command was recognized but contains some sort of error. |
Reimplemented from WsfObject.
References WsfNamed::GetName(), wsf::cyber::Protect::ProtectedAttack::ProcessInput(), and WsfObject::ProcessInput().
| bool wsf::cyber::Protect::ProtectionExists | ( | const std::string & | aAttackName | ) | const |
|
inlineoverridevirtual |
Requests a component's role interface. A component can support one or more roles.
| aRole | The role whose interface is to be returned. |
Implements WsfComponent.
References WsfSimpleComponentT< WsfPlatformComponent >::mRoles.
| double wsf::cyber::Protect::RecoveryDelayTime | ( | const std::string & | aAttackName | ) | const |
|
static |
References WsfScenario::RegisterComponentFactory().
Referenced by wsf::cyber::ScenarioExtension::AddedToScenario().
|
inline |