from typing import List
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 VersionCls:
"""
| Commands in total: 4
| Subgroups: 0
| Direct child commands: 4
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("version", core, parent)
[docs]
def get_catalog(self) -> List[str]:
"""
``SYSTem:SPECification:VERSion:CATalog`` \n
Snippet: ``value: List[str] = driver.system.specification.version.get_catalog()`` \n
Queries all data sheet versions stored in the instrument.
:return: vers_catalog: string
"""
response = self._core.io.query_str('SYSTem:SPECification:VERSion:CATalog?')
return Conversions.str_to_str_list(response)
[docs]
def get_factory(self) -> str:
"""
``SYSTem:SPECification:VERSion:FACTory`` \n
Snippet: ``value: str = driver.system.specification.version.get_factory()`` \n
Queries the data sheet version of the factory setting.
:return: version: string
"""
response = self._core.io.query_str('SYSTem:SPECification:VERSion:FACTory?')
return trim_str_response(response)
[docs]
def get_sfactory(self) -> str:
"""
``SYSTem:SPECification:VERSion:SFACtory`` \n
Snippet: ``value: str = driver.system.specification.version.get_sfactory()`` \n
No help available
"""
response = self._core.io.query_str('SYSTem:SPECification:VERSion:SFACtory?')
return trim_str_response(response)
[docs]
def set_sfactory(self, ds_fact_version: str) -> None:
"""
``SYSTem:SPECification:VERSion:SFACtory`` \n
Snippet: ``driver.system.specification.version.set_sfactory(ds_fact_version = 'abc')`` \n
No help available
"""
param = Conversions.value_to_quoted_str(ds_fact_version)
self._core.io.write(f'SYSTem:SPECification:VERSion:SFACtory {param}')
[docs]
def get_value(self) -> str:
"""
``SYSTem:SPECification:VERSion`` \n
Snippet: ``value: str = driver.system.specification.version.get_value()`` \n
Selects a data sheet version from the data sheets saved on the instrument. Further queries regarding the data sheet
parameters (<Id>) and their values refer to the selected data sheet. To query the list of data sheet versions, use the
command method ``RsSmw.system.specification.version.catalog()`` .
:return: version: string
"""
response = self._core.io.query_str('SYSTem:SPECification:VERSion?')
return trim_str_response(response)
[docs]
def set_value(self, version: str) -> None:
"""
``SYSTem:SPECification:VERSion`` \n
Snippet: ``driver.system.specification.version.set_value(version = 'abc')`` \n
Selects a data sheet version from the data sheets saved on the instrument. Further queries regarding the data sheet
parameters (<Id>) and their values refer to the selected data sheet. To query the list of data sheet versions, use the
command method ``RsSmw.system.specification.version.catalog()`` .
:param version: string
"""
param = Conversions.value_to_quoted_str(version)
self._core.io.write(f'SYSTem:SPECification:VERSion {param}')