from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from .....Internal.Utilities import trim_str_response
from ..... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class FileCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("file", core, parent)
[docs]
def set(self, file_path: str, channel=repcap.Channel.Default) -> None:
"""
``CHANnel<*>:EFRontend:ALIGn:FILE`` \n
Snippet: ``driver.channel.efrontend.align.file.set(file_path = 'abc', channel = repcap.Channel.Default)`` \n
Sets the path to the S-parameter file that contains the correction values for the cable that connects the frontend to the
oscilloscope.
:param file_path: String with path and name of the s2p file.
:param channel: optional repeated capability selector. Default value: Ch1 (settable in the interface 'Channel')
"""
param = Conversions.value_to_quoted_str(file_path)
channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel)
self._core.io.write_with_opc(f'CHANnel{channel_cmd_val}:EFRontend:ALIGn:FILE {param}')
[docs]
def get(self, channel=repcap.Channel.Default) -> str:
"""
``CHANnel<*>:EFRontend:ALIGn:FILE`` \n
Snippet: ``value: str = driver.channel.efrontend.align.file.get(channel = repcap.Channel.Default)`` \n
Sets the path to the S-parameter file that contains the correction values for the cable that connects the frontend to the
oscilloscope.
:param channel: optional repeated capability selector. Default value: Ch1 (settable in the interface 'Channel')
:return: file_path: String with path and name of the s2p file.
"""
channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel)
response = self._core.io.query_str_with_opc(f'CHANnel{channel_cmd_val}:EFRontend:ALIGn:FILE?')
return trim_str_response(response)