from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SelfCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("self", core, parent)
[docs]
def get_address(self) -> int:
"""
``SYSTem:COMMunicate:GPIB:[SELF]:ADDRess`` \n
Snippet: ``value: int = driver.system.communicate.gpib.self.get_address()`` \n
Sets the GPIB address.
:return: address: integer Range: 0 to 30
"""
response = self._core.io.query_str('SYSTem:COMMunicate:GPIB:SELF:ADDRess?')
return Conversions.str_to_int(response)
[docs]
def set_address(self, address: int) -> None:
"""
``SYSTem:COMMunicate:GPIB:[SELF]:ADDRess`` \n
Snippet: ``driver.system.communicate.gpib.self.set_address(address = 1)`` \n
Sets the GPIB address.
:param address: integer Range: 0 to 30
"""
param = Conversions.decimal_value_to_str(address)
self._core.io.write(f'SYSTem:COMMunicate:GPIB:SELF:ADDRess {param}')