from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
from .......Internal.Utilities import trim_str_response
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PrefixCls:
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("prefix", core, parent)
[docs]
def get_state(self) -> bool:
"""
``HCOPy:FILE:[NAME]:AUTO:[FILE]:PREFix:STATe`` \n
Snippet: ``value: bool = driver.hardCopy.file.name.auto.file.prefix.get_state()`` \n
Uses the prefix for the automatic generation of the file name, provided PREF:STAT is activated.
:return: state: 1 | ON | 0| OFF
"""
response = self._core.io.query_str('HCOPy:FILE:NAME:AUTO:FILE:PREFix:STATe?')
return Conversions.str_to_bool(response)
[docs]
def set_state(self, state: bool) -> None:
"""
``HCOPy:FILE:[NAME]:AUTO:[FILE]:PREFix:STATe`` \n
Snippet: ``driver.hardCopy.file.name.auto.file.prefix.set_state(state = False)`` \n
Uses the prefix for the automatic generation of the file name, provided PREF:STAT is activated.
:param state: 1 | ON | 0| OFF
"""
param = Conversions.bool_to_str(state)
self._core.io.write(f'HCOPy:FILE:NAME:AUTO:FILE:PREFix:STATe {param}')
[docs]
def get_value(self) -> str:
"""
``HCOPy:FILE:[NAME]:AUTO:[FILE]:PREFix`` \n
Snippet: ``value: str = driver.hardCopy.file.name.auto.file.prefix.get_value()`` \n
Uses the prefix for the automatic generation of the file name, provided PREF:STAT is activated.
"""
response = self._core.io.query_str('HCOPy:FILE:NAME:AUTO:FILE:PREFix?')
return trim_str_response(response)
[docs]
def set_value(self, prefix: str) -> None:
"""
``HCOPy:FILE:[NAME]:AUTO:[FILE]:PREFix`` \n
Snippet: ``driver.hardCopy.file.name.auto.file.prefix.set_value(prefix = 'abc')`` \n
Uses the prefix for the automatic generation of the file name, provided PREF:STAT is activated.
:param prefix: 1 | ON | 0| OFF
"""
param = Conversions.value_to_quoted_str(prefix)
self._core.io.write(f'HCOPy:FILE:NAME:AUTO:FILE:PREFix {param}')