from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ...Internal.Types import DataType
from ...Internal.StructBase import StructBase
from ...Internal.ArgStruct import ArgStruct
from ...Internal.ArgSingleList import ArgSingleList
from ...Internal.ArgSingle import ArgSingle
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class HsCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("hs", core, parent)
[docs]
def set(self, interface: str, set_py: str) -> None:
"""
``TEST:HS`` \n
Snippet: ``driver.test.hs.set(interface = 'abc', set_py = 'abc')`` \n
No help available
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('interface', interface, DataType.String), ArgSingle('set_py', set_py, DataType.String))
self._core.io.write(f'TEST:HS {param}'.rstrip())
# noinspection PyTypeChecker
[docs]
class GetStruct(StructBase):
"""
Response structure. Fields: \n
- 1 Interface: str: No parameter help available
- 2 Result: str: No parameter help available
"""
__meta_args_list = [
ArgStruct.scalar_str('Interface'),
ArgStruct.scalar_str('Result')]
def __init__(self):
StructBase.__init__(self, self)
self.Interface: str = None
self.Result: str = None
[docs]
def get(self, get_py: str) -> GetStruct:
"""
``TEST:HS`` \n
Snippet: ``value: GetStruct = driver.test.hs.get(get_py = 'abc')`` \n
No help available
:return: structure: for return value, see the help for GetStruct structure arguments.
"""
param = Conversions.value_to_quoted_str(get_py)
return self._core.io.query_struct(f'TEST:HS? {param}', self.__class__.GetStruct())