from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import enums
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DelayCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("delay", core, parent)
[docs]
def set(self, delay: enums.FadDelay, path=repcap.Path.Default) -> None:
"""
``[SOURce<HW>]:FSIMulator:CDYNamic:PATH<CH>:DELay`` \n
Snippet: ``driver.source.fsimulator.cdynamic.path.delay.set(delay = enums.FadDelay.ADELay, path = repcap.Path.Default)`` \n
Sets the delay defined in the file for the fading path.
:param delay: BDELay | ADELay BDELay Sets the delay defined in the file for a path group. ADELay Sets the delay defined in the file for the respective path.
:param path: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Path')
"""
param = Conversions.enum_scalar_to_str(delay, enums.FadDelay)
path_cmd_val = self._cmd_group.get_repcap_cmd_value(path, repcap.Path)
self._core.io.write(f'SOURce<HwInstance>:FSIMulator:CDYNamic:PATH{path_cmd_val}:DELay {param}')
# noinspection PyTypeChecker
[docs]
def get(self, path=repcap.Path.Default) -> enums.FadDelay:
"""
``[SOURce<HW>]:FSIMulator:CDYNamic:PATH<CH>:DELay`` \n
Snippet: ``value: enums.FadDelay = driver.source.fsimulator.cdynamic.path.delay.get(path = repcap.Path.Default)`` \n
Sets the delay defined in the file for the fading path.
:param path: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Path')
:return: delay: BDELay | ADELay BDELay Sets the delay defined in the file for a path group. ADELay Sets the delay defined in the file for the respective path.
"""
path_cmd_val = self._cmd_group.get_repcap_cmd_value(path, repcap.Path)
response = self._core.io.query_str(f'SOURce<HwInstance>:FSIMulator:CDYNamic:PATH{path_cmd_val}:DELay?')
return Conversions.str_to_scalar_enum(response, enums.FadDelay)