:orphan: .. **************************************************************************** .. CUI .. .. The Advanced Framework for Simulation, Integration, and Modeling (AFSIM) .. .. The use, dissemination or disclosure of data in this file is subject to .. limitation or restriction. See accompanying README and LICENSE for details. .. **************************************************************************** WSF_CYBER_SCRIPT_EFFECT ----------------------- .. model:: cyber_effect WSF_CYBER_SCRIPT_EFFECT .. parsed-literal:: cyber_effect :model:`WSF_CYBER_SCRIPT_EFFECT` platform_type ... effect_scripts_ definitions script void Attack ... end_script script void Restore ... end_script end_platform_type platform ... effect_scripts_ definitions script void Attack ... end_script script void Restore ... end_script end_platform default ... effect_scripts_ definitions script void Attack ... end_script script void Restore ... end_script end_default end_cyber_effect Overview ======== :model:`WSF_CYBER_SCRIPT_EFFECT` is a cyber_effect that allows one to define the effect using the scripting language. .. note:: This effect does NOT require user supplied data during a CyberAttack initiation call. Commands ======== .. command:: platform_type ... end_platform_type Define the effect scripts for a platform type. This command may be repeated as necessary. .. command:: platform ... end_platform Define the effect scripts for a specific platform. This command may be repeated as necessary. .. command:: default ... end_default Define the effect scripts for any victim that does is not specified by platform or platform_type. This command is only valid once, and multiple instances of this block will only use the last declared instance of this block. .. _effect_scripts: Effect Scripts ^^^^^^^^^^^^^^ Two scripts must be defined to implement an effect: .. parsed-literal:: script void Attack(WsfCyberEngagement aEngagement) end_script script void Restore(WsfCyberEngagement aEngagement) end_script The 'Attack' script is invoked when the attack has been determined that it will occur. The method should take the necessary actions to cause whatever is needed to implement the effect. The 'Restore' script is invoked when the it has been determined that the victim has recovered from the attack. The method should take the necessary actions to rescind whatever actions were taken by the 'Attack' script (essentially restoring the platform to the state that existed prior to the attack.)