Source code for rsrtx.Implementations.Layout.Histogram.Enable

from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from ....Internal.Types import DataType
from ....Internal.ArgSingleList import ArgSingleList
from ....Internal.ArgSingle import ArgSingle


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

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

[docs] def set(self, histogram: str, state: bool) -> None: """ ``LAYout:HISTogram:ENABle`` \n Snippet: ``driver.layout.histogram.enable.set(histogram = 'abc', state = False)`` \n Enables or disables the histogram evaluation and display. :param histogram: String parameter, name of the histogram as defined with method ``RsRtx.layout.histogram.add()``. :param state: OFF | ON """ param = ArgSingleList().compose_cmd_string(ArgSingle('histogram', histogram, DataType.String), ArgSingle('state', state, DataType.Boolean)) self._core.io.write_with_opc(f'LAYout:HISTogram:ENABle {param}'.rstrip())
[docs] def get(self, histogram: str) -> bool: """ ``LAYout:HISTogram:ENABle`` \n Snippet: ``value: bool = driver.layout.histogram.enable.get(histogram = 'abc')`` \n Enables or disables the histogram evaluation and display. :param histogram: String parameter, name of the histogram as defined with method ``RsRtx.layout.histogram.add()``. :return: state: OFF | ON """ param = Conversions.value_to_quoted_str(histogram) response = self._core.io.query_str_with_opc(f'LAYout:HISTogram:ENABle? {param}') return Conversions.str_to_bool(response)