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 FileCls:
"""
| Commands in total: 7
| Subgroups: 4
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("file", core, parent)
@property
def day(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_day'):
from .Day import DayCls
self._day = DayCls(self._core, self._cmd_group)
return self._day
@property
def month(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_month'):
from .Month import MonthCls
self._month = MonthCls(self._core, self._cmd_group)
return self._month
@property
def prefix(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_prefix'):
from .Prefix import PrefixCls
self._prefix = PrefixCls(self._core, self._cmd_group)
return self._prefix
@property
def year(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_year'):
from .Year import YearCls
self._year = YearCls(self._core, self._cmd_group)
return self._year
[docs]
def get_number(self) -> int:
"""
``HCOPy:FILE:[NAME]:AUTO:[FILE]:NUMBer`` \n
Snippet: ``value: int = driver.hardCopy.file.name.auto.file.get_number()`` \n
Queries the number that is used as part of the file name for the next hard copy in automatic mode. At the beginning, the
count starts at 0. The R&S SMW200A searches the specified output directory for the highest number in the stored files. It
increases this number by one to achieve a unique name for the new file. The resulting auto number is appended to the
resulting file name with at least three digits.
:return: number: integer Range: 0 to 999999
"""
response = self._core.io.query_str('HCOPy:FILE:NAME:AUTO:FILE:NUMBer?')
return Conversions.str_to_int(response)
[docs]
def get_value(self) -> str:
"""
``HCOPy:FILE:[NAME]:AUTO:FILE`` \n
Snippet: ``value: str = driver.hardCopy.file.name.auto.file.get_value()`` \n
Queries the name of the automatically named hard copy file. An automatically generated file name consists of:
<Prefix><YYYY><MM><DD><Number>.<Format>. You can activate each component separately, to individually design the file name.
:return: file: string
"""
response = self._core.io.query_str('HCOPy:FILE:NAME:AUTO:FILE?')
return trim_str_response(response)
def clone(self) -> 'FileCls':
"""
Clones the group by creating new object from it and its whole existing subgroups.
Also copies all the existing default Repeated Capabilities setting,
which you can change independently without affecting the original group.
"""
new_group = FileCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group