Source code for RsSmw.Implementations.Source.ListPy.Index

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


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

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

[docs] def get_start(self) -> int: """ ``[SOURce<HW>]:LIST:INDex:STARt`` \n Snippet: ``value: int = driver.source.listPy.index.get_start()`` \n Sets the start and stop index of the index range which defines a subgroup of frequency/level value pairs in the current list. """ response = self._core.io.query_str('SOURce<HwInstance>:LIST:INDex:STARt?') return Conversions.str_to_int(response)
[docs] def set_start(self, start: int) -> None: """ ``[SOURce<HW>]:LIST:INDex:STARt`` \n Snippet: ``driver.source.listPy.index.set_start(start = 1)`` \n Sets the start and stop index of the index range which defines a subgroup of frequency/level value pairs in the current list. :param start: integer Index range Only values inside this range are processed in list mode Range: 0 to list length """ param = Conversions.decimal_value_to_str(start) self._core.io.write(f'SOURce<HwInstance>:LIST:INDex:STARt {param}')
[docs] def get_stop(self) -> int: """ ``[SOURce<HW>]:LIST:INDex:STOP`` \n Snippet: ``value: int = driver.source.listPy.index.get_stop()`` \n Sets the start and stop index of the index range which defines a subgroup of frequency/level value pairs in the current list. :return: stop: integer Index range Only values inside this range are processed in list mode Range: 0 to list length """ response = self._core.io.query_str('SOURce<HwInstance>:LIST:INDex:STOP?') return Conversions.str_to_int(response)
[docs] def set_stop(self, stop: int) -> None: """ ``[SOURce<HW>]:LIST:INDex:STOP`` \n Snippet: ``driver.source.listPy.index.set_stop(stop = 1)`` \n Sets the start and stop index of the index range which defines a subgroup of frequency/level value pairs in the current list. :param stop: integer Index range Only values inside this range are processed in list mode Range: 0 to list length """ param = Conversions.decimal_value_to_str(stop) self._core.io.write(f'SOURce<HwInstance>:LIST:INDex:STOP {param}')
[docs] def get_value(self) -> int: """ ``[SOURce<HW>]:LIST:INDex`` \n Snippet: ``value: int = driver.source.listPy.index.get_value()`` \n Sets the list index in LIST:MODE STEP. After the trigger signal, the instrument processes the frequency and level settings of the selected index. :return: index: integer """ response = self._core.io.query_str('SOURce<HwInstance>:LIST:INDex?') return Conversions.str_to_int(response)
[docs] def set_value(self, index: int) -> None: """ ``[SOURce<HW>]:LIST:INDex`` \n Snippet: ``driver.source.listPy.index.set_value(index = 1)`` \n Sets the list index in LIST:MODE STEP. After the trigger signal, the instrument processes the frequency and level settings of the selected index. :param index: integer """ param = Conversions.decimal_value_to_str(index) self._core.io.write(f'SOURce<HwInstance>:LIST:INDex {param}')