Source code for RsFsw.Implementations.System.Communicate.Gpib.Self.Address

from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class AddressCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("address", core, parent)

[docs] def set(self, address: float) -> None: """ ``SYSTem:COMMunicate:GPIB[:SELF]:ADDRess`` \n Snippet: ``driver.system.communicate.gpib.self.address.set(address = 1.0)`` \n This command sets the GPIB address of the FSW. :param address: Range: 0 to 30 """ param = Conversions.decimal_value_to_str(address) self._core.io.write(f'SYSTem:COMMunicate:GPIB:SELF:ADDRess {param}')
[docs] def get(self) -> float: """ ``SYSTem:COMMunicate:GPIB[:SELF]:ADDRess`` \n Snippet: ``value: float = driver.system.communicate.gpib.self.address.get()`` \n This command sets the GPIB address of the FSW. :return: address: Range: 0 to 30 """ response = self._core.io.query_str(f'SYSTem:COMMunicate:GPIB:SELF:ADDRess?') return Conversions.str_to_float(response)